List the names of subroutines of the hierarchy chart, and then write complete ps
ID: 3712037 • Letter: L
Question
List the names of subroutines of the hierarchy chart, and then write complete pseudocode for the following problem. Problem: Students get a discount on the tuition paid. The discount is based on a student's code and the registered number of course credits. A student with a code "M" for a military job, and registered for more than four credits is eligible for 5% discount on the tuition amount. A student with a code "C" for a corporate employee, and registered for more than six credits is eligible for 4% discount on the tuition amount. Produce the pseudocode logic for an algorithm that will compute the tuition' discount for each student. The information is given as follows: - The output will consist of a screen display showing the student's name, code, and discount received. - The input will consist of the file with records containing the student's name, code, and tuition amount. - The processing will compute the discount received by each student. If the student's code is other than "M" or "C", there should be no discount on the tuition amount. Note: Your solution should contain a mainline, and at least three subroutines.
Explanation / Answer
Solution:
Pseudocode:
The subroutines in this scenario can be
one subroutine which will calculate the discount after the user has entered the input of the code and credits
another one will have to calculate the tutionAmount to be paid
and one is the main suproutine.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.