cinmay Xu

Greenhorn
+ Follow
since Jun 26, 2015
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 cinmay Xu

Yes, I tested the first two parts and they worked well. I need help from here :
// Go over each character of input
// If that single character is NOT a valid digit of that base, return false immediately
// If you finish going through the characters, return true
I don't know how to compare each char with the base.
Could you give me some tips?



Henry Wong wrote:
It is generally a good idea to write and test each piece -- as you are building your application. This means that you need to make sure it compiles, even though the program is not complete, so that you may test it... So...

cinmay Xu wrote:Need help on java coding homework: chose the base(X=2,3,4,5,6,7,8,9,10)),enter an 8 digit number and let the program to judge if the number is based x(2-10). I already wrote the first two parts and need help on the others.



Have you tested and confirm that the first two parts work? Does what you have compile?

Henry

8 years ago
Need help on java coding homework: chose the base(X=2,3,4,5,6,7,8,9,10)),enter an 8 digit number and let the program to judge if the number is based x(2-10). I already wrote the first two parts and need help on the others.

Don't know how to do these:

[Go over each character of input
If that single character is NOT a valid digit of that base, return false immediately
If you finish going through the characters, return true]

Next is the code:

8 years ago