# Thread: Could somebody write me this simple program in java?

1. Member Join Date
Feb 2017
Posts
1
Rep Power
0

## Could somebody write me this simple program in java?

I am creating a java app and have to code the algorithm for that, however am not able to do it properly.
I search for somebody who would do it for me, of course for a payment.

The algorithm for the program is:

1. User inputs their initial rating (A)
2. Program gets initial rating of the user
3. User inputs initial rating of their oponent (B)
4. Program getsinitial rating of the users opponent
5. User inputs the result of the game (Win/Loss/Draw)
6. Program gets the result of the game
7. In case of users win:
A) If (B-A) belongs to [n*10,n*10 + 9] (for B-A that belongs to natural numbers and 0), than the new rating of the user = A + 8 + n

For instance: If (B-A) belongs to [0,9], than the new rating of the user = A+8 If (B-A) belongs to [10,19], than the new rating of the user = A+9 If (B-A) belongs to [20,29], than the new rating of the user = A+10 If (B-A) belongs to [30,39], than the new rating of the user = A+11 If (B-A) belongs to [40,49], than the new rating of the user = A+12 If (B-A) belongs to [50,59], than the new rating of the user = A+13

B) If (B-A) belongs to [n*(10), n*(10) - 9] (for B-A that belongs to negative integers) , than the new rating of the user = A + 8 + n

For instance: If (B-A) belongs to [-30,-39] , than the new rating of the user = A+8-3 = A +5 If ( B-A) belongs to [40,49] , than the new rating of the user = A+4 If (B-A) belongs to [50,59] , than the new rating of the user = A+3

C) If (B-A) < - 80 , than the new rating of the = A+1

In case of users loss:
A) If (A-B) belongs to [n*10,n*10 +9] (for A-B that belongs to the natural numbers and 0) , than the new rating of the user = A - 8  n

B) If (A-B) belongs to [n*(10), n*(10) - 9] (for A-B that belongs to negative integers) , than the new rating of the user = A  8  n

For instance: If (A-B) belongs to [-30,-39 , than the new rating of the user = A - 8 - (-3) = A  5

C) If (A-B) < -80 , than the new rating of the user = A - 1

In case of a draw:
A) If (A-B) belongs to [-10,10], than the new rating of the user = A

B) If (A-B) belongs to [n*10 + 1, n*10 + 20] (for n that belongs to the odd numbers), than the new rating of the user = A  n For instance: If (A-B) belongs to [11,30], than the new rating of the user = A - 1

C) If (A-B) belongs to [n*10 - 1, n*10 - 20] (for n that belongs to the negative odd numbers), than the new rating of the user = A + n For instance: If (A-B) belongs to [-31,-50], than the new rating of the user = A + 3

8. Program (returns/outprints/outputs) shows the newly calculated rating of a user, according to the algorithm above.

I code in Eclipse Neon,
Would be very thankful for some feedback,
contactme via mail: Removed
Cheers!
Last edited by DarrylBurke; 02-20-2017 at 06:00 PM. Reason: Removed cheater's email address 2. ## Re: Could somebody write me this simple program in java?

You are paying other people to do your work. That's not a coder's attitude, but a management one. Stop your CS study and go for a management study.

Besides, it's called cheating, with or without payment. Cheaters are not welcome here. Go away. 3. ## Re: Could somebody write me this simple program in java? Originally Posted by SurfMan Cheaters are not welcome here.

db algorithm, algorithm problems, java, loop 