In: Computer Science
During this course you will design a program for a state university. The university needs a website design that will enable students to order books online. Each week you will receive additional instructions for the elements of the design based on the needs of the university. The elements will correspond with the concepts and skills you learn that week.
According to the university's website design request, students need to order five books, one for each of the five required courses that all students take. You need to design a program that will prompt students for the price of each book and display the total cost for the five books.
Create a 1- to 1 3/4-page document listing the steps needed to solve the problem using an algorithm, including the following:
Create a 1/2- to 1-page document of your pseudocode based on the algorithm, including the following:
Create a 1-page flowchart based on the algorithm, including the following:
Answer: Hey! Kindly find your solution here. If you have any queries, feel free to ask me. I would be very happy to resolve that. Thanks.
Identify the input needed- To solve this you have to input
Input price of each book
Process- Calculate the total cost of five books
Output- Cost of five books
Pseudocode-
Start
Function Main
Declare Real Array bookPrice[6]
Declare Real cost
Assign cost = 0
Declare Integer i
Assign i = 1
While i<=5
//Pseudocode for input
Output "enter the price of book"&i
Input bookPrice[i]
//Pseudo code for process
Assign cost = cost+bookPrice[i]
Assign i = i+1
End
//Pseudocode for output
Output "The cost of five books is: $"&cost
End