32,204 Topics

Member Avatar for
Member Avatar for Sheena26

write a program to read in a list of exam scores (integer percentage in the range 0 TO 100) and to output the total number of grades as well as the number of grades in each letter- grade category (90-100=A, 80-89=B, 70-79=C, 60-69=D and 0-59=F) and what percentage of the …

Member Avatar for Sheena26
0
493
Member Avatar for Slyvr

It's only reading every other line. It's supposed to print out: 28 80.0 22 1 2 2 3 1 3 But it's only reading: 80.0 1 2 1 [CODE]//Load button - #=daynum, $=wallet, @=inventory, &=employees, !=customers if (btn2.getText().equals("Load")){ int id=0; File file = new File("savefile1.txt"); BufferedReader reader = null; try …

Member Avatar for Slyvr
0
3K
Member Avatar for Wootens

Hey guys, I have this Java code and I'm trying to convert it to MIPS. I've made an effort and I'm confused to what mistakes I've made. If anyone knows MIPS, I'd really appreciate some guidance! When ran in Java, I get these values: x = 10500531 y = -1374550272 …

Member Avatar for ztini
0
219
Member Avatar for minimi

[url]http://img838.imageshack.us/img838/2795/problemx.jpg[/url] I'm completely lost.. could anyone help me get started writing pseudocode? Thank you!

Member Avatar for ztini
0
84
Member Avatar for Java NOOB

Hello all this is one that yes is home work but I really have no clue what to do with it. please can someone help. 23. What is the output generated by this code fragment? System.out.printf("%4.1f\n", 8.); System.out.printf("%,.1f\n", 1234.567);

Member Avatar for ztini
0
65
Member Avatar for smithy_2009

Hi, I'm just learning to program and I'm stuck on a basic problem, printing today's date in a form typified by (e.g.) 28 February 2011 [CODE]import java.util.*; class Date { int day, month, year; } class PrintToday { static Date thisDay() { Date today = new Date(); GregorianCalendar c = …

Member Avatar for mKorbel
0
108
Member Avatar for MFal

I really appreciate all the help i've been getting on my project lately from you guys, and hopefully this will be the last problem. I've written an applet, and it uses ActionListener to detect when the button is pressed. The program is [I]supposed[/I] to go through my methods when the …

Member Avatar for Ezzaral
0
3K
Member Avatar for hanvyj

I have made a small example to illustrate my problem. I have overwritten the createToolTip method for a custom JComponent (eventually it will depend on where abouts the mouse is in the component as to what text to bring up) At first I thought it wasn't being called, but i …

Member Avatar for mKorbel
0
1K
Member Avatar for Sheena26

i need help on my project 1. Write a program that will print out statistics for eight coin tosses. The user will input either an “h” for heads or a “t” for tails for the eight tosses. The program will then print out the total number and percentages of heads …

Member Avatar for Sheena26
0
1K
Member Avatar for rude04

hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] …

Member Avatar for rude04
0
722
Member Avatar for 24x24

Ok I have another homework problem. Essentially I am to make a text file of randomized characters ( leters bothe upper and lower case, numbers, spaces and specialized characters) and import it as a string into my program. From there I am to make all lowercase letters uppercase. I think …

Member Avatar for 24x24
0
434
Member Avatar for phycoCoder

Dear users of "daniweb" This question has no coding issues but is still about java and java code i thought this would be the best place to post such a question its for my schools Program Dossier. I need a [library or API] that can manipulate a robotic arms motors …

Member Avatar for peter_budo
0
204
Member Avatar for kubiak

Please help me with the double linked list, when I write the command in terminal to test main class by my source code the cmd.exe throw me: Exception in thread "main" java.lang.NullPointerException at homework.List.add(Homework2.java:19) at homework.Homework2Main.main(Homework2Main.java:20) In 19 line is something wrong in source code, I tag him. Please I …

Member Avatar for javaAddict
0
303
Member Avatar for emcyroyale

Basically this program uses an abstract class which 3 other classes extends to so that in the end an overridden toString() method will print out how many pages must be read for each class. Okay, well this program is for a class, but I am kinda of stuck because my …

Member Avatar for quuba
0
205
Member Avatar for bharath54321

could anybody help me pls. the below is the text file. It contains n message flows and n nodes. i have to search each message flows which is available in that text file and if i select any text file it shoukd display the nodes which are available ... could …

Member Avatar for Katana24
0
286
Member Avatar for Stazloz

I am writing a program for school, its a problem from Deitel and Deitel Java: How to program. I have to write a turtle drawing program. It works great, what I have now is a method named enterCommands() that works that takes no arguments that can be used to cycle …

Member Avatar for masijade
0
121
Member Avatar for gunitwarriors

I am having problems. I am trying to run a program that output suppose to be mutiple triangles but when I run it. I only get one. Here is the code please tell me what I am doing wrong. Thank you Kevin! [code] import java.awt.Color; import java.awt.Graphics; public class Triangle …

Member Avatar for JamesCherrill
0
77
Member Avatar for ChieftanBill

I came across a code snippit from my textbook with a : symbol. [CODE] for (String arg : arg){ System.out.println(arg); } [/CODE] I'd like to know what that : is, and what function it serves. Thanks,

Member Avatar for JamesCherrill
0
104
Member Avatar for Shizuo

hes the code [code]import java.io.*; import java.awt.*; import java.awt.event.*; import java.lang.*; public class CreateEventFile extends Frame implements ActionListener, WindowListener { private Label companyName = new Label("Event Handlers Incorporated"); Font bigFont = new Font ("Helvetica", Font.ITALIC, 24); private Label prompt = new Label("Enter this month's events"); private TextField host = new …

Member Avatar for masijade
0
169
Member Avatar for qwerty_jakarta

[B][COLOR="Red"]Hello [/COLOR][/B] I am using java 1.6 and RXTXComm package (Javax.comm) package. [B][COLOR="Green"]HOW can I read data from a electronic weighing machine?[/COLOR][/B] Please help give source code................

0
47
Member Avatar for cjd_1986

I have to write this applet for my CIT 130 class. I understand that you can not give solutions nor do I want you to do my homework for me I just need some pointers. The questions ask to "Write an applet that draws a house with it's door and …

Member Avatar for cjd_1986
0
194
Member Avatar for lashbandi

heyy.. i am getting error on line 51 "Stack<Character> stack = new Stack<Character>();"..how can i fix it? please help. [CODE]import java.io.IOException; import java.util.Scanner; public class SymbolChecker { private String enter; public SymbolChecker(String in) { enter = in; } Scanner input = new Scanner(System.in); public void check() { int stackSize = …

Member Avatar for ~s.o.s~
0
224
Member Avatar for manish250

Hello all i have created a java application which is writing to log files to specific path.logs are created successfully.When i use cat command to show the contents it is showing the correct data but when i use vi to open the file it is showing the contents like binary …

Member Avatar for ~s.o.s~
0
229
Member Avatar for java_stud

i'm having a problem with my code for evaluating postfix expressions. any comments on what's wrong on my code? [code] import java.io.*; import java.util.*; import java.util.Stack; public class Eval { private Stack<String> operatorStack; private Stack<Integer> operandStack; public int evaluate(String output) { StringTokenizer s = new StringTokenizer(output);//divides into tokens int value; …

Member Avatar for ~s.o.s~
0
218
Member Avatar for pramod.singh

in my application i have to use multiple databases. i am using i-batis. i wants to access multiple database instances through I-Batis. i dont want to use multiple configs. Is it possible to connect to multiple databases using same configs file in i-batis. Any help will be appreciated. Thanks !

0
42
Member Avatar for musikluver4

I want to be able to create JLabels, all different names, with a for loop ex: [CODE] static JLabel[] totalAYearLabelYr = new JLabel[termYears]; [/CODE] So I got 30 JLabels named totalAYearLabelYr, which I'm not sure you can have 30 JLabels named the same thing. I wanna name them all totalAYearLabelYr1 …

Member Avatar for musikluver4
0
7K
Member Avatar for oldezwe

-List of names in a database -names have double assigned to them, x -each name has random 10 digit double generated from 0 to x -the name with the highest number double is assigned to a variable -if two names generate the same double then the name with in the …

Member Avatar for Progr4mmer
0
172
Member Avatar for FUTURECompEng

[ICODE]I need to solve a 3x3 matrix, x,y,z of a funtion (I only have a 2x2 matrix determinant solved) I have figured out how to solve the determinant with this code and I have created another attached program that displays any size matrix I thought it might help.[/ICODE] [CODE] public …

Member Avatar for FUTURECompEng
0
650
Member Avatar for insanely_sane

Hey guys. So I want to learn how to do a simple I/O to and from a file. I want the simplest way to do this. My teacher sent me her program but I don't think I get what she is doing and it's giving me an error. So I …

Member Avatar for Progr4mmer
0
223
Member Avatar for jimJohnson

I have a very simple question for someone. I am trying to get back into java programming and I downloaded the latest textpad. Can someone please provide me the link of what else I need? I am on a Windows 7 machine.

Member Avatar for Progr4mmer
0
135

The End.