Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The most important part of developing a program/software is the design process. You are required to describe the following characteristics: purpose, input, process, and output,
The most important part of developing a program/software is the design process. You are required to describe the following characteristics: purpose, input, process, and output, and create three test cases, pseudocode and a flowchart for each of the following questions. You may use any tool you desire to create your flowchart, but it cannot be hand drawn. Please note you are not asked to write and C++ code and pseudocode should not include any C++ elements such as but not limited to semicolons, cout, and cin. Due at 11:55pm. Question 1: Hotel Occupancy Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has. A loop should then iterate once for each floor. In each iteration, the loop should ask the user for the number of rooms on the floor and how many of them are occupied. After all the iterations, the program should display how many rooms the hotel has, how many of them are occupied, how many are unoccupied, and the percentage of rooms that are occupied. The percentage may be calculated by dividing the number of rooms occupied by the number of rooms. NOTE: It is traditional that most hotels do not have a thirteenth floor. The loop in this program should skip the entire thirteenth iteration. Input Validation: Do not accept a value less than 1 for the number of floors. Do not accept a number less than 10 for the number of rooms on a floor. Question 2: Budget Analysis Design a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget. Input Validation: Do not accept a value less than 100 for the budget. Do not accept a number less than 1 for the expense. Question 3: Soundex System Soundex is a system that encodes a word into a letter followed by three digits that roughly describe how the word sounds. That is, similar sounding words have similar four-character codes. For instance, the words carrot and caret are both coded as C630. A slight variation of the Soundex coding algorithm is as follows: A. Retain the first letter. B. For the remaining letters, delete all occurrences of a,e,i,o,u,h,y, and w C. Replace the letters that remain with numbers so that A. b, f, p, and v become 1 . c, g,j,k,q,s,x, and z become 2 b and t both become 3 D. I (that is el) becomes 4 E. m and n become 5 F. r becomes 6 D. If the result contains two adjacent identical digits, eliminate the second of them. E. Keep only the first four characters of what you have left. If you have fewer than four, then add zeros on the end to make the string have length four. The most important part of developing a program/software is the design process. You are required to describe the following characteristics: purpose, input, process, and output, and create three test cases, pseudocode and a flowchart for each of the following questions. You may use any tool you desire to create your flowchart, but it cannot be hand drawn. Please note you are not asked to write and C++ code and pseudocode should not include any C++ elements such as but not limited to semicolons, cout, and cin. Due at 11:55pm. Question 1: Hotel Occupancy Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has. A loop should then iterate once for each floor. In each iteration, the loop should ask the user for the number of rooms on the floor and how many of them are occupied. After all the iterations, the program should display how many rooms the hotel has, how many of them are occupied, how many are unoccupied, and the percentage of rooms that are occupied. The percentage may be calculated by dividing the number of rooms occupied by the number of rooms. NOTE: It is traditional that most hotels do not have a thirteenth floor. The loop in this program should skip the entire thirteenth iteration. Input Validation: Do not accept a value less than 1 for the number of floors. Do not accept a number less than 10 for the number of rooms on a floor. Question 2: Budget Analysis Design a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget. Input Validation: Do not accept a value less than 100 for the budget. Do not accept a number less than 1 for the expense. Question 3: Soundex System Soundex is a system that encodes a word into a letter followed by three digits that roughly describe how the word sounds. That is, similar sounding words have similar four-character codes. For instance, the words carrot and caret are both coded as C630. A slight variation of the Soundex coding algorithm is as follows: A. Retain the first letter. B. For the remaining letters, delete all occurrences of a,e,i,o,u,h,y, and w C. Replace the letters that remain with numbers so that A. b, f, p, and v become 1 . c, g,j,k,q,s,x, and z become 2 b and t both become 3 D. I (that is el) becomes 4 E. m and n become 5 F. r becomes 6 D. If the result contains two adjacent identical digits, eliminate the second of them. E. Keep only the first four characters of what you have left. If you have fewer than four, then add zeros on the end to make the string have length four
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started