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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education