Question

In: Computer Science

(I AM IN A INTRO TO PROGRAMMING, PLEASE USE SIMPLE PSEUDOCODE IF POSSIBLE) Create pseudocode for...

(I AM IN A INTRO TO PROGRAMMING, PLEASE USE SIMPLE PSEUDOCODE IF POSSIBLE)

Create pseudocode for a program for Hansel's Housecleaning Service.

The program prompts the user for a customer's last name only. While the last name is not “zzz” your program will ask for the number of bathrooms and the number of other rooms to be cleaned and display the cleaning charge. You should use a sentinel-controlled while loop in your main loop logic. A customer name of “zzz” signals the end of the data.

The cleaning charge is $40 plus $15 for each bathroom and $10 for each of the other rooms. Use data validation loop to make sure the number of bathrooms is >= 0, and the number of other rooms is also >= 0. The program will display the total cleaning charge and then prompt for the next customer's name.

When the loop is exited (user enters “zzz” for the last name), display a message indicating that the program is complete.

Your program will have the main module and a function that, given the number of bathrooms and the number of other rooms, will return that total cleaning charge for the customer.

Solutions

Expert Solution

Here is your program pseudo code. Feel free to ask any doubt.

START

FUNCTION cleaning(bath,room)
   declare charge
   charge=40+bath*15+room*10
   RETURN charge
END FUNCTION


Declare bath, room, charge
Display "Welcome to the Hansel's Housecleaning Service"

Display "Enter customer's last name"
Read name
WHILE( name!='zzz')
   WHILE(TRUE)
       Display " Enter the number of bathrooms"
       Read bath
       Display " Enter the number of rooms"
       Read room
       IF bath>=0 and room>=0
           break
       END IF
   END WHILE
   charge=cleaning(bath,room)
   Display "total cleaning charge for the customer" charge
   Display ""Enter customer's last name"
   Read name
END WHILE
Display "Thanks for using Hansel's Housecleaning Service"

STOP


Related Solutions

Please create using only For loops, as simple as possible as I am attending Java1 Create...
Please create using only For loops, as simple as possible as I am attending Java1 Create two Java programs that do the following: a. Use a for loop to print the numbers below on a single line as shown. 1 2 4 8 16 32 64 128. b. Ask the user to enter numbers using the for loop.  First ask the user how many numbers they will be entering in. Print the sum and average of the entered numbers. c. Write...
Please write in C++ as simple as possible I want you to create a Book Class...
Please write in C++ as simple as possible I want you to create a Book Class for a bookstore. I am not going to tell you what variables should go into it, that is for you to figure out (but you should have at least 5+). And then you must create a UML with all the variables and methods (like: the getters and setters, a default constructor, and a constructor that takes all the variables and finally the printValues() )....
Hi! I am in an intro level Finance course and I am stuck on this problem....
Hi! I am in an intro level Finance course and I am stuck on this problem. Any help would be greatly appreciated. I am deciding on opening a restaurant. I was able to scrape together some capital from friends and family, but I must pay them back in 4 years at 12% per annum. I figure that it will cost me $165,000 to start up with rent, deposits, equipment, salaries, chicken, basil, rice, etc. for the first year, but I...
This is an Intro to java question. Please provide code and pseudocode for better understanding. Problem...
This is an Intro to java question. Please provide code and pseudocode for better understanding. Problem 4: Player Move Overworld (10 points) (Game Development) You're the lead programmer for an indie game studio making a retro-style game called Zeldar. You've been tasked to implement the player movement. The game is top-down, with the overworld modeled as a 2d grid. The player's location is tracked by x,y values correlating to its row and column positions within that grid. Given the current...
This is an intro to java question. Please answer with pseudocode and code. Problem 2: RSA...
This is an intro to java question. Please answer with pseudocode and code. Problem 2: RSA Public Key (10 points) (Cyber Security) RSA is an asymmetric encryption scheme, where a public key is used to encrypt data and a different, private key decrypts that data. RSA public/private keys are generated from two prime numbers, typically very large ones. The idea behind RSA is based on the fact that its difficult to factorize very large integers. RSA public key generation is...
This is an Intro to Java Question, Please respond with code and pseudocode. Problem 3: RSA...
This is an Intro to Java Question, Please respond with code and pseudocode. Problem 3: RSA Private Key (10 points) (Cyber Security) In the RSA algorithm, encrypting and decrypting a message is done using a pair of numbers that are multiplicative inverses with respect to a carefully selected modulus. In this task, you must calculate the modular multiplicative inverse for given set of values. What is the Modular Multiplicative Inverse? In mathematics, each operation typically has an inverse. For example,...
This is an intro to java question. Please post with pseudocode and java code. Problem should...
This is an intro to java question. Please post with pseudocode and java code. Problem should be completed using repetition statements like while and selection statements. Geometry (10 points) Make API (API design) Java is an extensible language, which means you can expand the programming language with new functionality by adding new classes. You are tasked to implement a Geometry class for Java that includes the following API (Application Programming Interface): Geometry Method API: Modifier and Type Method and Description...
I am using a photoshop character that I drew. Please provide AS SIMPLE OF A PROCEDURE...
I am using a photoshop character that I drew. Please provide AS SIMPLE OF A PROCEDURE AS POSSIBLE!! 1. How do you create a sprite in Unity? 2. How do you create a sprite sliced in Unity? Thank you :)
Intro to java Problem, Please provide code and Pseudocode. Not able to compile correct numbers. Problem...
Intro to java Problem, Please provide code and Pseudocode. Not able to compile correct numbers. Problem 7: Simple Calculator (10 points) (General) Calculators represent the most basic, general-purpose of computing machines. Your task is to reduce your highly capable computer down into a simple calculator. You will have to parse a given mathematical expression, and display its result. Your calculator must support addition (+), subtraction (-), multiplication (*), division (/), modulus(%), and exponentiation (**). Facts ● Mathematical expressions in the...
Intro to Java Question. Please Provide code and pseudocode for understanding. Not receiving correct results currently....
Intro to Java Question. Please Provide code and pseudocode for understanding. Not receiving correct results currently. Problem 5: Player Move Dungeon (10 points) (Game Development) You're the lead programmer at a AAA studio making a sequel to the big hit game, Zeldar 2. You've been challenged to implement player movement in dungeons. The game is top-down, with dungeons modeled as a 2d grid with walls at the edges. The player's location is tracked by x,y values correlating to its row...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT