Ameer Alqallaf

Greenhorn
+ Follow
since May 24, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ameer Alqallaf

Hi

I am trying to define a class called time which will hold integers for hours and minutes.
my problem now is: how to examine the minutes parameter...if it is greater than 59, then how to transfer the multiples of 60
over to the hours portion of the Time object. (e.g., new Time(10,93) results in 11 hours and 33
minutes).

any idea how can I do this?
12 years ago
here is my final project


Is there any modifications you suggest me to do with it ?
Rob thanks for the advice about using math.max it would really make it a lot easier but as I said I'm trying to learn java step by step and I would defenetly use your advice in the future
12 years ago
Wow, you guys are very amazing and fast )

Thanks for help, now I'm trying to change the code using JOptionpane to get the numbers and show the result in visual box instead of entering it in the counsil
and I'm stuck here



any help what to do next ?
12 years ago
I've tried that. It gave me the max and min = 0 !
is there a way ti fix that?!

thanks
12 years ago
Thank you very much for you fast replay.

it was really a silly mistake
I'm sure it is because I didn't sleep unitl now trying to write this code

thanks for your comment , you are write about the arry thing , and that is why I mentioned in my post that I know there are other methods ut I was asked to do it this way without arrys as I am totaly beggener to programing and I need to learn it step y step :-)

thank you once more and have a good day
12 years ago
Hi,
I've been trying to write my first code ever..
I think I somehow managed to do it but there is a compiler error and I can't figure out what it is.
The program suppose to ask the user for 5 numers and then it print the maximum value and the minumum value.
Here is what I wrote:




and here is the error I get
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: java.util.Scanner.netxtInt
Enter five numbers
at firstA.FirstA.main(First1.java:11)

the wrrors are in these lines
a = keyboard.netxtInt ();
b = keyboard.netxtInt ();
c = keyboard.netxtInt ();
d = keyboard.netxtInt ();
e = keyboard.netxtInt ();

PS. I know there maybe another way to do it but I want to do it this way, and please exuse the mess because I am totaly new to this forum.
12 years ago