I have this question on my study guide, and I'm not even sure how to begin to answer it.
" When sorting a collection of objects that implements the Comparable type, the sorting method compares and...
Type: Posts; User: BuhRock
I have this question on my study guide, and I'm not even sure how to begin to answer it.
" When sorting a collection of objects that implements the Comparable type, the sorting method compares and...
So I want to know from someone who actually has a job programming or has had, what a realistic salary for a java programmer is?
I'm in college now and I'm concerned about what my future holds. I...
What should I do then in order to get help because I really am at a point where I'm not sure what my next step? I realize I have a lot of code here, but I can't help that.
I never asked for a handout of code. I obviously have done the work here. I told you what was asked. Everything I typed above, has been implemented other than the GUI part. I said I don't know how to...
So I have to program this MVC GUI of a checkout line. I have a gui that has 10 registers. Each register has a queue of customers. There is a button that when clicked, will generate a customer and the...
I got it working, but I need the register icon to display at the top of each column. By doing new GridLayout(12,10) , that is 12 rows, 10 columns?
import java.awt.BorderLayout;
import...
So, I wanna display a little image of a register at the top of each column to display a checkout line. I can't seem to get the Icon to show. What's wrong here? I've followed the example in my book...
So I have to take a step back. I can't use a Priority Queue for my customers. My professor said not to. I'll just use a LinkedList Queue for the customer line.
Do I still need the comparable and...
I guess what I'm confused on, is how to instantiate the registers. The constructor of my store class creates ten registers. So in my temporary tester class, do I even need to do this:
Register reg...
Yes, I suppose it works, it printed out the double that the customer has when its created.. I made a class and added a customer to a register. I just need help on how to add customers to different...
Would this work?
double totalTime = 0;
for(Customer cust: line ){
totalTime +=cust.getServiceTime();
}
So I have to implement a checkout line using a priority queue. I'm really stuck. I have 3 classes, a Register class, Store class, and customer class.
Each customer has a service time which is the...
I'm not sure if the methods I have written are correct. I also don't know how to solve the others.
So, I have to implement a linked-list to create a collection. I have to create the add, remove, union, equals, contains, isEmpty, size, and iterator method. I also have to implement an interface....
Could you not use the StringBuffer class to append the into to the string? Then just put the String variable in the dialogbox, instead of calling a method?
Like this:
String x = new...
What is the rest of your code? Also can you put your code inside code brackets?
I need to read an address and phone number from a file. In the file there are three lines, each of them having something like John Doe, 123 first Street, (555) 555-5555, 123456789 on each line. I...
You didn't pass the overallscore variable into the getScore method, so the compiler can't find it.
Please put your code in [code] tags.
Yeah I know thats the formula on how to get the percent, but I dont know how to implement that. I have tried:
percents[0] = (grade[0] / outOf[0]) * 100;
...
I am using an array to store 5 test scores. Then I have another array for the total possible score the test could have. I just need to find out what percent the grade is out of the total possible...
You can accept input like this:
import java.util.Scanner;
public class Testt
{
public static void main(String[] args)
{
String input;
Just to add to his reply, You were resetting the variables smallest and largest every time you asked, which just meant that they were going to take the value of the what ever was input last and...
Im writing the demo for my class to demonstrate each method. The class takes a number and assigns it to a month, or is supposed to. I have it working to say month 1 is January, month 2 is February...
alright thanks, I use JGrasp, where there is no help but the errors the compiler gives, haha.