The Department plans to purchase a humanoid robot. The Chairman would like you to write a program to show a greeting script the robot can use later. Your first task is to use the following script to prototype the robot for presentation: **************** Robot Prototype Scripting ******************** Hello, welcome to Montgomery College! My name is Nao. May I have your name? john Smith Nice to have you with us today, john Smith! Let me impress you with a small game. Give me the age of an important person or a pet to you. Please give me only a number: 2 You have entered 2. If this is for a person, the age can be expressed as: 2 years or 24 months or about 720 days or about 17280 hours or about 1036800 minutes or about 62208000 seconds. If this is for a dog, it is 14 years old in human age. If this is for a gold fish, it is 10 years old in human age. Let's play another game, john Smith. Give me a whole number. 4 Very well. Give me another whole number. 5 Using the operator '+' in C++, the result of 4 + 5 is 9. Using the operator '/', the result of 4 / 5 is 0 however, the result of 4.0 / 5.0 is about 0.8. Thank you for testing my program!! PROGRAMMER: Your Name CMSC140 Common Project 1 Due Date: Write a program that uses the script above as a guide without roles, i.e. robot computer and visitor human, to prototype robot greeting in C++. See the Sample Screen Output below. Project Specifications Input Visitor’s name An age Two numbers Output: The program should display the following data: Complete script described above Your name as the programmer Assignment/Project number Due date Processing Requirements The program should declare and initialize (i.e. create and assign values for) variables/constants to hold (at least) the following data: Robot Name. This variable will hold the Robot Name. Initialize the variable with “Nao” or a name of your choice. Visitor Name, this variable will hold the user’s name. This variable will hold a person’s or a pet’s age. A constant variable for Programmer’s Name. Initialize the variable with your full name. A constant variable for Assignment Number. Initialize the variable with the value 1. A constant variable for Due Date. Initialize the variable with the due date of this assignment. Constant variables for Days of Month, Human Year, Gold Fish Year. Initialize the variables, for example const int ONE_DOG_YEAR = 7; const int DAYS_PER_MONTH = 30; Use the above variables when creating the output of the program, for example: cout << “My name is “ << robotName; Where robotName is a variable defined in your program. Use the following for the computations in the program : 1 month = 30 days Dog’s age = 7 times human’s age, Gold fish age = 5 times human’s age sample screen output:-attached as image
The Department plans to purchase a humanoid robot. The Chairman would like you to write a program to show a greeting script the robot can use later. Your first task is to use the following script to prototype the robot for presentation:
**************** Robot Prototype Scripting ********************
Hello, welcome to Montgomery College! My name is Nao. May I have your name? john Smith Nice to have you with us today, john Smith! Let me impress you with a small game. Give me the age of an important person or a pet to you. Please give me only a number: 2
You have entered 2. If this is for a person, the age can be expressed as: 2 years or 24 months or about 720 days or about 17280 hours or about 1036800 minutes or about 62208000 seconds. If this is for a dog, it is 14 years old in human age. If this is for a gold fish, it is 10 years old in human age.
Let's play another game, john Smith. Give me a whole number. 4 Very well. Give me another whole number. 5 Using the operator '+' in C++, the result of 4 + 5 is 9. Using the operator '/', the result of 4 / 5 is 0 however, the result of 4.0 / 5.0 is about 0.8.
Thank you for testing my program!! PROGRAMMER: Your Name CMSC140 Common Project 1 Due Date: |
Write a program that uses the script above as a guide without roles, i.e. robot computer and visitor human, to prototype robot greeting in C++. See the Sample Screen Output below.
Project Specifications
Input
- Visitor’s name
- An age
- Two numbers
Output: The program should display the following data:
- Complete script described above
- Your name as the programmer
- Assignment/Project number
- Due date
Processing Requirements
- The program should declare and initialize (i.e. create and assign values for) variables/constants to hold (at least) the following data:
- Robot Name. This variable will hold the Robot Name. Initialize the variable with “Nao” or a name of your choice.
- Visitor Name, this variable will hold the user’s name.
- This variable will hold a person’s or a pet’s age.
- A constant variable for Programmer’s Name. Initialize the variable with your full name.
- A constant variable for Assignment Number. Initialize the variable with the value 1.
- A constant variable for Due Date. Initialize the variable with the due date of this assignment.
- Constant variables for Days of Month, Human Year, Gold Fish Year. Initialize the variables, for example const int ONE_DOG_YEAR = 7; const int DAYS_PER_MONTH = 30;
- Use the above variables when creating the output of the program, for example:
cout << “My name is “ << robotName;
Where robotName is a variable defined in your program.
- Use the following for the computations in the program :
- 1 month = 30 days
- Dog’s age = 7 times human’s age,
- Gold fish age = 5 times human’s age
sample screen output:-attached as image
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images