Details of this Paper

computer science




1 Find the Bugs;// This pseudocode segment is intended to compute and display;// the average grade of three tests for any number of students.;// The program executes until the user enters a negative value;// for the first test score.;start;Declarations;num test1;num test3;num average;housekeeping();while test1 >= 0;mainLoop();endwhile;housekeeping();stop;housekeeping();output "Enter score for test 1 or a negative number to quit;input test1;return;mainLoop();output "Enter score for test 2";input test2;output "Enter score for test 3";input test2;average = (test1 + test2) + test3 / 3;output "Average is ", average;output "Enter score for test 1 or a negative number to quit;input test;return;endOfJob();output "End of program;return;2 Write the pseudocode for a program for the sales manager of The Norman Used Car Dealership. The program will determine the profit on any car sold. Input includes the sale price and actual purchase price for a car. The output is the profit, which is the sale price minus the purchase price. Use three modules. The main program declares global variables and calls housekeeping, detail, and end-of-job modules. The housekeeping module prompts for and accepts a sale price. The detail module prompts for and accepts the purchase price, computes the profit, and displays the result. The end-of-job module displays the message Thanks for using this program;3 Write the pseudocode for a program that calculates service charges for Norman?s Housecleaning service. The program contains housekeeping, detail loop, and end-of-job modules. The main program declares any needed global variables and constants and calls the other modules. The housekeeping module displays a prompt for and accepts a customer?s last name. While the user does not enter ZZZZ for the name, the detail loop accepts the number of bathrooms and the number of other rooms to be cleaned. The service charge is computed as $40 plus $15 for each bathroom and $10 for each of the other rooms. The detail loop also displays the service charge and then prompts the user for the next customer?s name. The end-of-job module, which executes after the user enters the sentinel value for the name, displays a message that indicates the program is complete.


Paper#72074 | Written in 18-Jul-2015

Price : $27