32,204 Topics
| |
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 … | |
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 … | |
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 … | |
[url]http://img838.imageshack.us/img838/2795/problemx.jpg[/url] I'm completely lost.. could anyone help me get started writing pseudocode? Thank you! | |
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); | |
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 = … | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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 … | |
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 … | |
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, | |
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 … | |
[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................ | |
| 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 … |
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 = … | |
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 … | |
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; … | |
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 ! | |
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 … | |
-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 … | |
[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 … | |
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 … | |
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. |
The End.