Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,207,757 members, 8,000,201 topics. Date: Tuesday, 12 November 2024 at 03:42 AM |
Nairaland Forum / Science/Technology / Programming / Please Solve This Java Problem. (2779 Views)
Please HELP Me With This Java Program / Help Me Solve This Java Regex Problem / When Your Brain Throws Stackoverflow Error - Debug This JAVA Code If You Can (2) (3) (4)
Please Solve This Java Problem. by lekropasky(m): 12:39pm On Aug 20, 2015 |
Develop a Java application that determines the Gross pay for each of three employees. The company pays straight time for the first 40hours worked by each employee and time and a half for all hours worked in excess of 40hours. You're given a list of the employees, their number of hours worked last week and their hourly rates. Your program should input this information for each employee. Then determine and display the employee"s gross pay. Use class scanner to input the data. Goodluck. |
Re: Please Solve This Java Problem. by OracleMxNelson(m): 12:43pm On Aug 20, 2015 |
nsobu |
Re: Please Solve This Java Problem. by DonSegmond(m): 1:56pm On Aug 20, 2015 |
lekropasky:
Now, write it in Java your damn self. Goodluck! 2 Likes |
Re: Please Solve This Java Problem. by khaynoni(m): 5:47pm On Aug 20, 2015 |
I hope this helps. Though the sad news is that it is written in Python so like the guy up there said, rewrite it in Java. 1 Like |
Re: Please Solve This Java Problem. by lekropasky(m): 7:29pm On Aug 20, 2015 |
khaynoni: WoW....thanks Bro. You Rocks. I have some questions... -I dont know the use of the 'k' and why it appears in the print statement. -and i dont understand where you use 1.5 in the variable overtime_pay. Thank You. |
Re: Please Solve This Java Problem. by khaynoni(m): 7:57pm On Aug 20, 2015 |
lekropasky: The bolded explains why I used 1.5, note that a time and a half is the same as 1 1/ 2 = 3/2 = 1.5. As for the "k", if you run the program, you'll understand how it works. |
Re: Please Solve This Java Problem. by khaynoni(m): 8:11pm On Aug 20, 2015 |
By the way, have you tried writing the codes in Java? When you run it, what was the output? Do you know that you still need to modify my code so as to enable the user know what to input? Do you know that you have to ensure that every value the user enters is the data type you would want to be inputted; for example, in the case of the code above where the user is being asked to enter the hourly_pay, if he inputs twenty instead of 20, do you know it will give an error msg? These are just part of the modifications you'll have to make. Good luck |
(1) (Reply)
Cleandesktop Full Version Open Source Released / Top 10 Richest Software Programmers In The World / Are There Nigerian Companies Using These Languages?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17 |