cpt307 weekone assignment

docx

School

University Of Arizona *

*We aren’t endorsed by this school

Course

CPT307

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

7

Uploaded by AdmiralElephant282

Report
Week One Assignment Calculate Pay Program CPT307: Data Structures and Algorithms Denise Smith 10/28/2021
Assignment: I ran into many obstacles trying to complete this program, but I am glad to say I was able to get through in one piece a thru and completed it. My comprehension is getting better I also did research and viewed a lot of you tube tutorials. I also tried to reach out to some of the tutors at UAGC which seemed tedious, but all in it came together. I am still using Android IDE and it is literally a life saver. I couldn’t finish my code here I had to get a tutor and redo my program .I have the screenshots below. A few of the other tutorials on you tube guide me along the way and I reviewed scanner for java meant in class. It basically means that the various inputs we type like strings, int, double, and so on are indicator languages of some sort. I made my class public and
then I entered the assignment details, like taxes, deductions, etc. I made sure to as make the static final and set them once, and the double was required since the numbers were in decimal form. Next, I entered “public static void main(String[] args)” which allows Java to be to run the program properly in the public mode. Once I placed my program to public, I submitted my code in static final doubles, for the different taxes and deductions. They were entered as static final. Next, keyed the “System.out.println” and displayed elements to show the employee’s name, wages, and hours that they had worked. Next the taxes and deductions, were implemented into the program as “double”. I calculated the example from the assignment above and multiplied by the hours worked, that gave me the taxes and deductions. Afterward I calculated taxes, etc., then I added everything and subtracted that from the gross pay. Net pay is established this way. Finally, I coded that into my program, and keyed the “System.out.println” for each category Employee Name, Rate of Pay, Hours Worked, Overtime Worked, Gross Pay Total amount of deductions, and the Net Pay. Finally, as required I went ahead and set up program “Calculate another employee? “and set a continual loop or quit option.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help