Modify the pseudocode design that you created so far for your ITP 100 Project. To do the following : As the student adds courses, load an array named courses[ ] with the course name. As the student adds courses, load a parallel array named cost[ ] with the cost of that course. Use the cost[ ] array to calculate the total bill. Be sure that you are not duplicating the totaling logic in you project solution. It should be clean, simple code. Save the hierarchy chart as ITP100Project-Part4-Hierarchy-LastName.doc | Save the pseudocode design using the filename ITP100Project-Part4-LastName.doc   Below is the code that was completed in the earlier steps (Can you please modify the existing code and solve it, thanks): //Global Constant Global Constant     TECH_FEE = 0.05     Module main ()     //Local Variable     Declare Integer studentID, ClassTitles , hoursWorked, numofClass, techFee, totalBill classCost=$150         //Get Student ID     Call getStudentID ()         //Get Class Titles     Call getCLassTitles () End Module     Module getStudentID ()     Display "Please enter your Student ID:"     Input studentID End Module     Module getClassTitles ()     //Get number of class student wants to add and calculate the total bill     Display "One class will be free if you add three classes."     Display "How many classes do you want to take? (Limit 3)"     Input numofClass       If numofClass > 3 then     Display "Error: Maximum of 3 Class Allowed"       While numofClass <= 3         if numofClass == 1 then         Display "Please enter the Class Title"         Input class1         Set classCost = 150 * numofClass         Set techFee = classCost * TECH_FEE         Set totalBill = classCost + techFee                 Else if numofClass == 2 then         Display "Please enter the first Class Title:"         Input class1         Display "Please enter the second Class Title:"         Input class2         Set classCost = 150 * numofClass         Set techFee = classCost * TECH_FEE         Set totalBill = classCost + techFee             Else if numofClass == 3 AND hoursWorked <= 20 then         Display "Please enter the first Class Title:"         Input class1         Display "Please enter the second Class Title:"         Input class2         Display "Please enter the third Class Title:"         Input class3         Display "One class will be free as you added three classes!"         Set classCost = 150 * (numofClass - 1)         Set techFee = classCost * TECH_FEE         Set totalBill = classCost + techFee                 Else if numofClass == 3 AND hoursWorked > 20 then         Display "Please make an appointment with the faculty advisor"                 End if                 Display "StudentID:" , StudentID         Display "Total Class Cost is $" , classCost         Display "Total Tech Fee is $" , techFee         Display "Total Bill including tech fee is $" , totalBill     End While End Module

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question

Modify the pseudocode design that you created so far for your ITP 100 Project. To do the following :

  • As the student adds courses, load an array named courses[ ] with the course name.
  • As the student adds courses, load a parallel array named cost[ ] with the cost of that course.
  • Use the cost[ ] array to calculate the total bill. Be sure that you are not duplicating the totaling logic in you project solution. It should be clean, simple code.

Save the hierarchy chart as ITP100Project-Part4-Hierarchy-LastName.doc | Save the pseudocode design using the filename ITP100Project-Part4-LastName.doc

 

Below is the code that was completed in the earlier steps (Can you please modify the existing code and solve it, thanks):

//Global Constant

Global Constant

    TECH_FEE = 0.05

 

 

Module main ()

    //Local Variable

    Declare Integer studentID, ClassTitles , hoursWorked, numofClass, techFee, totalBill classCost=$150

   

    //Get Student ID

    Call getStudentID ()

   

    //Get Class Titles

    Call getCLassTitles ()

End Module

 

 

Module getStudentID ()

    Display "Please enter your Student ID:"

    Input studentID

End Module

 

 

Module getClassTitles ()

    //Get number of class student wants to add and calculate the total bill

    Display "One class will be free if you add three classes."

    Display "How many classes do you want to take? (Limit 3)"

    Input numofClass

 

    If numofClass > 3 then

    Display "Error: Maximum of 3 Class Allowed"

 

    While numofClass <= 3

        if numofClass == 1 then

        Display "Please enter the Class Title"

        Input class1

        Set classCost = 150 * numofClass

        Set techFee = classCost * TECH_FEE

        Set totalBill = classCost + techFee

       

        Else if numofClass == 2 then

        Display "Please enter the first Class Title:"

        Input class1

        Display "Please enter the second Class Title:"

        Input class2

        Set classCost = 150 * numofClass

        Set techFee = classCost * TECH_FEE

        Set totalBill = classCost + techFee

   

        Else if numofClass == 3 AND hoursWorked <= 20 then

        Display "Please enter the first Class Title:"

        Input class1

        Display "Please enter the second Class Title:"

        Input class2

        Display "Please enter the third Class Title:"

        Input class3

        Display "One class will be free as you added three classes!"

        Set classCost = 150 * (numofClass - 1)

        Set techFee = classCost * TECH_FEE

        Set totalBill = classCost + techFee

       

        Else if numofClass == 3 AND hoursWorked > 20 then

        Display "Please make an appointment with the faculty advisor"

       

        End if

       

        Display "StudentID:" , StudentID

        Display "Total Class Cost is $" , classCost

        Display "Total Tech Fee is $" , techFee

        Display "Total Bill including tech fee is $" , totalBill

    End While

End Module

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage