Assignment 1

Construct a solution algorithm for the following problems. Your solution should contain:

  • Defining problem
  • Pseudo code algorithm
  • Desk check of the algorithm (two test cases for each question)

1. A transaction record on a sales commission file contains the retail price of an item sold, a transaction code that indicates the sales commission category to which an item can belong, and the employee number of the person who sold the item. The transaction code can contain the values A, B or C, which indicate that the percentage commission will be 6%, 8% or 10% respectively. Construct an algorithm that will read a record on the file, calculate the commission owing for that record, and print the retail price, commission and employee number.

2. Design an algorithm that will prompt an operator for a student's serial number and the students exam score out of 100. Your program is then to match the exam score to a letter grade and print the grade to the screen. Calculate the letter grade as follows:

Exam score Assigned grade
85 and above HD
75-84 D
65-74 C
50-64 P
below 50 F

3. Design an algorithm to accept income from the user; compute the income tax to be paid and display the income and the tax payable on the screen.

Income tax calculation is based on the following table. It is also available at this link: https://www.iras.gov.sg/irashome/Individuals/Locals/Working-Out-Your-Taxes/Income- Tax-Rates/

Assignment 2

Question 1: Based on the feedback received for Question 1 in Assignment 1, transform the algorithm into JAVA programming language. Briefly, explain (150-200 words) how the logic works and any other methodologies of implementing the same program.

Question 2: Based on the feedback received for Question 2 in Assignment 1, transform your algorithm into a JAVA program. Your code should contain appropriate validations and must focus on code optimization. Briefly, explain (150-200 words) the logic of the program and how the code can be optimised.

Modify the code to repeat the program until the user enters "no".

Sample output to be as follows: see image.

Question 3: Based on the feedback received for Question 3 in Assignment 1, transform your algorithm into a JAVA program. Your code should contain appropriate validations and must focus on code optimization.

Modify the code to repeat the program until the user enters an income value of -1. Briefly, explain (150-200 words) the logic of the program and how the code can be optimised.

Sample output to be as follows: see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.