The university reassessed its needs for the design and determined it will no longer require all students to take five classes. Update the program to reflect the following changes: Prompt the student f


MemoThe university reassessed its needs for the design and determined it will no longer require all students to take five classes. Update the program to reflect the following changes: Prompt the student f 1

To:

//Fill In//

From:

//Fill In//

Class:

//Fill In//

Date:

//Fill In//

Re:

Individual Assignment for Week 2

According to the University requirements for their website design, the University requires all students to make an order of at least five books where one of each book pertains to the course the student is taking. When a student makes an order of the textbooks, the program prompts the student to input the price of each book and the programs displays the total cost of the five books. Therefore, to solve the University’s problem, an algorithm is designed to define the steps that will be followed by the design.

The steps needed are as follows:

Problem definition

The University requires a website design that will enable its student’s order books online.

Requirement identification

When the student accesses the website to order their course textbooks, they will be prompted to input the price of each book. All students are required to order five books, one book for each course taken. Once the student inputs the price of each book, the program will auto calculate the total cost of the books and display.

Program inputs

The program will use the following inputs to execute the commands from the student and calculate the total cost of the books.

  • Number of courses

  • Number of Books

  • Price of each book

Input Process

The input process of the program will involve a few steps that will actively interact with the student once they access the website when ordering books. The student will be required to input the number of course taken in the university. Secondly, the student will be prompted to enter the number of books ordered and next required to input the price of each book ordered.

Program Outputs

Once the student has keyed in the number of books and the prices of each book, the program then calculates the total price of all the books ordered by the student.

Pseudo code for the program

Begin program

  1. Declare option as integer

  2. Display “Enter number of course taken”

  3. Input option

  4. Display “Enter number of textbook and the prices”

  5. Input option

  6. Display: “Do you want to add another textbook”

  7. Display: “Enter 1 for Yes or 2 for No”

  8. Input option

  9. If option = 1 then

For book = 1 to 5

  1. Display “Enter number of textbook and price”

  2. Input option

End for

  1. Else Display “Calculate the total price”

  2. Output option “The total amount of this transaction is (“Total”)

  3. End program







Start Program




Input price of textbooks

Input number of textbooks

If yes

If yes

End Program

Output: “The total amount of this transaction is (“Total”)

Calculate the total price

Any other book you need to add

Display “Enter number of textbook”

Input number of courses

Display “Enter number of courses taken


0