//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"     end if     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   Modify the above pseudocode design to do the following: (FYI: Please modify the existing code only in Pseudocode) - 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.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter10: Classes And Objects
Section: Chapter Questions
Problem 1E
icon
Related questions
Question
100%
//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"
    end if

    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
 

Modify the above pseudocode design to do the following: (FYI: Please modify the existing code only in Pseudocode)

- 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.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Returning value from Function
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 with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage