Question
I need help creating a hierarchy chart for my given PSUEDOCODE: Module studentID( ) Declare integer studentID Display Enter your student ID Input studentID End
I need help creating a hierarchy chart for my given PSUEDOCODE:
Module studentID( )
Declare integer studentID
Display Enter your student ID
Input studentID
End studentID
// -
Module calculateBill(integer numberOfClasses)
Declare real totalBill
If (numberOfClasses = 3)
totalBill = (numberOfClasses * 150) + 0.05 (numberOfClasses * 150) 150
End If
Else
totalBill = (numberOfClasses * 150) + 0.05 (numberOfClasses * 150)
End else
return totalBill
End calculateBill
// -
Module printBill(integer studentID, real totalBill)
Display studentID + ,your total bill is + totalBill
End printBill
Module main( )
// declare variables
Call Module studentID( )
Declare integer numberOfHours
Display How many hours do you work per week?
Input numberOfHours
Declare studentName
Display Enter your full name
Input studentName
// declare array
Declare String className [3]
Declare integer numberOfClasses
// start infinite loop
While (True)
Display Enter number of classes
Input numberOfClasses
If (0 < numberOfClasses < 4)
For (i = 0 to i = numberOfClasses)
Display Enter your class name
Input className [I]
End For loop
Break
End If
Else
Display ERROR: TOO MANY CLASSES!
End Else
End While loop
If (numberOfClasses = 3 and numberOfHours > 20)
Display Please make an appointment with your faculty advisor
End if
Declare real totalBill
totalBill = Call Module calculateBill(numberOfClasses)
Call Module printBill(studentID, totalBill)
End Module main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started