First Lab, ITSC 121, Spring 2020
Overview
Write 3 different programs dealing with selection and things from chapter 4.
Details of program 1
This is problem 4.12. Write a program that prompts the user to enter a hex digit and displays the corresponding binary number. For an incorrect input, display invalid input. Here are two sample runs:
- Enter a hex digit: B
- The binary value is 1011
- Enter a hex digit: G
- G is an invalid input.
Details of program 2
This is problem 4.15. The international standard letter/number mapping can be found on most telephones. Write a program that prompts the user to enter a lower or uppercase letter and displays its corresponding number. For a non-letter input, display invalid input. Here is one sample run:
- Enter a letter: A
- The corresponding number is 2
Details on program 3
This is problem 4.23. Write a program that reads the following information and prints a payroll statement:
- Employee's name (e.g. Smith)
- Number of hours worked in a week (e.g. 10)
- Hourly pay rate (e.g. 9.75)
- Federal tax withholding rate (e.g. 20%)
- State tax withholding rate (e.g. 9%)
A sample run is a follows:
Enter employee's name:
Smith
Enter number of hours worked in a week:
10
Enter hourly pay rate:
9.75
Enter federal tax withholding rate:
0.20
Enter state tax withholding rate:
0.09
Employee name: Smith
Hours Worked: 10.0
Pay Rate: $9.75
Gross Pay: $97.50
Deductions
Federal Withholding (20.0%): $19.5
State Withholding (9.0%): $8.77
Total Deduction: $28.27
Net Pay: $69.22
Details about all programs
- Include proper comments for all
- Use proper formatting, etc.
- Test with more than one set of data
- Get the correct data outputted on all programs before worrying about formatting
Submissions
- Create a software development report that includes the following for each program:
- A problem summary (the big picture)
- A list of requirements. (Things that this particular implementation of a solution must do)
- A list of steps your program does
- A testing report: What exact input you used and what output you got.
- How long it took to write the program
- Who you got help from (if you got help)
- Changes (if any) you would make if you had more time and/or skill
- At least two things you learned while writing all the programs
- Create a zip folder with your software development report(s) and your java files and submit that to canvas.
- Due date can be found on canvas