Programming Logic and Design, 6th Edition Chapter 2 Exercises Explain why each of the following names does or does not seem like a good variable name to you. If myAge and yourRate are numeric variables, and departmentName is a string variable, which of the following statements are valid assignments? If a statement is not valid, explain why not. Assume that cost = 10 and price = 12 . What is the value of each of the following expressions? Draw a typical hierarchy chart for a paycheck-producing program. Try to think of at least 10 separate modules that might be included. For example, one module might calculate an employee’s dental insurance premium. 5 . Draw the hierarchy chart and then plan the logic for a program for the sales manager of The Couch Potato Furniture Company. The manager needs a program to determine the profit on any item sold. Input includes the wholesale price and retail price for an item. The output is the item’s profit, which is the retail price minus the wholesale 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 wholesale price. The detail module prompts for and accepts the retail price, computes the profit, and displays the result. The end-of-job module displays the message “Thanks for using this program”. 6. a. Draw the hierarchy chart and then plan the logic for a program that calculates the gown size a student needs for a graduation ceremony. The program uses three modules. The first prompts a user for and accepts the student’s height in inches. The second module accepts the student’s weight in pounds and converts the student’s height to centimeters and weight to grams. Then, it calculates the graduation gown size needed by adding 1/3 of the weight in grams to the value of the height in centimeters. The program’s output is the gown size the student should order. There are 2.54 centimeters in an inch and 453.59 grams in a pound. Use named constants wherever you think they are appropriate. The last module displays the message “End of job”. b. Revise the size-determining program to execute continuously until the user enters 0 for the height in inches. 7. Draw the hierarchy chart and design the logic for a program that contains housekeeping, detail loop, and end-of-job modules, and that calculates the service charge customers owe for writing a bad check. 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 amount of the check in dollars and cents. The service charge is computed as $20 plus 2 percent of the check amount. 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. 8. Draw the hierarchy chart and design the logic for a program for the owner of Bits and Pieces Manufacturing Company, who needs to calculate an employee’s projected salary following a raise. The input is the name of the employee, the employee’s current weekly salary, and the percentage increase expressed as a decimal (for example, 0.04 for a 4 percent raise). Design the program so that it runs continuously for any number of employees using three modules. The housekeeping module prompts the user for the percent raise that will be applied to every employee, and prompts for the first employee’s name. The detail loop executes continuously until the user enters “XXX” for the employee’s name. The detail loop gets the employee’s weekly salary, applies the raise, produces the result, and prompts for the next employee name. The end-of-job module, which executes after the user enters the sentinel value for the n…

Looking for a solution written from scratch with No plagiarism and No AI?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay