1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kvv77 [185]
3 years ago
15

Project Description The Department plans to purchase a humanoid robot. The Chairman would like us to write a program to show a g

reeting script the robot can use later. Our first task is to use the following script to prototype the robot for presentation: (Robot) Computer: Hello, welcome to Montgomery College! My name is Nao. May I have your name? (Visitor) Human: Taylor (Robot) Computer: Nice to have you with us today, Taylor! 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! (Visitor) Human: 2 (Robot) Computer: 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 (Robot) Computer: Let's play another game, Taylor. Give me a whole number (Visitor) Human: 4 (Robot) Computer: Very well. Give me another whole number (Visitor) Human: 5 (Robot) Computer: 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 (Robot) Computer: Do you like the games, Taylor? If you do, you can learn more by taking our classes. If you don't, I am sad. You should talk to our Chairman! 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++
Computers and Technology
1 answer:
artcher [175]3 years ago
4 0

Answer:

C++ code is explained below

Explanation:

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

// Variables to store inputs

string robot_name = "Nao";

string visitor_name;

int age, first_num, second_num;

// Constant variable initialisation for programmer name

const string programmer_name = "XXXXXXXX";

// Constant variable initialisation for assignment number

const string assignment_num = "123546";

// Constant variable initialisation for due date

const string due_date = "16 August, 2019";

// Displaying robot's name as script

cout << "Hello, welcome to Montgornery College!";

cout << "My name is " << robot_name << " . May I have your name?" << "\n\n";

// Taking visitor's name as input from the visitor

cin >> visitor_name;

// Displaying vistor's name as script

cout << "\n\nNice to have your with us today, " << visitor_name << "! ";

cout << "Let me impress you with a small game.";

cout << "Give me the age of an important person or a pet to you. ";

cout << "Please give me only a number!" << "\n\n";

// Taking human age as input from the visitor

cin >> age;

// Displaying human's age as script

cout << "\n\nYou have entered " << age << ". If this is for a person,";

cout << " the age can be expressed as " << age << " years or ";

// Computing months, days, hours, minutes and seconds from age input

double months = age*12;

double days = months*30;

double hours = days*24;

double minutes = hours*60;

double seconds = minutes*60;

// Computing dogs and fish age from human's age

double dogs_age = 7*age;

double gold_fish_age = 5*age;

// Displaying months, hours, minutes, hours and seconds as script

cout << months << " months or about " << days << " days or";

cout << " about " << fixed << setprecision(0) << hours << " hours or about " << minutes;

cout << " or about " << fixed << setprecision(0) << seconds << " seconds. If this is for a dog.";

// Displaying dogs age and gold fish age as script

cout << " it is " << dogs_age << " years old in human age.";

cout << " If this is for a gold fish, it is " << gold_fish_age;

cout << " years old in human age" << "\n\n";

cout << "Let's play another game, " << visitor_name << "!";

cout << "Give me a whole number." << "\n\n";

// Taking first whole number from the visitor

cin >> first_num;

cout << "\nVery well. Give me another whole number." << "\n\n";

// Taking second whole number from the vistor

cin >> second_num;

// Computing sum and division for displaying in the script

double sum = first_num+second_num;

double division = first_num/second_num;

float floatDivision = (float)first_num/second_num;

// Displaying sum and division script

cout << "\nUsing the operator '+' in C++,";

cout << " the result of " << first_num << " + " << second_num;

cout << " is " << sum << ". Using the operator '/', the result ";

cout << "of " << first_num << " / " << second_num << " is " << division;

cout << "; however, the result of " << first_num << ".0 /" << second_num;

cout << ".0 is about " << floatDivision << "." << "\n\n";

cout << "Do you like the games, " << visitor_name << "?";

cout << " If you do, you can learn more by taking our classes.";

cout << ". If you don't, I am sad, You should talk to our Chairman!" << "\n\n";

// Displaying Programmer Name, Assignment Number and due date to output screen

cout << "Programmer Name : " << programmer_name << endl;

cout << "Assignment Number : " << assignment_num << endl;

cout << "Due Date : " << due_date << endl;

 

return 0;

}

You might be interested in
What must you do first in order to change the font type size and colour of a particular text
salantis [7]
Highlight the text you want to change
3 0
3 years ago
Read 2 more answers
The first version of Windows to have a Start button and taskbar was?
PilotLPTM [1.2K]
Lol I think it’s 1 but I’m not sure
8 0
3 years ago
Fill in the blank: Every database has its own formatting, which can cause the data to seem inconsistent. Data analysts use the _
dmitriy555 [2]

The tool used by data analysts to create a clean and consistent visual appearance for their spreadsheets is called <u>clear formats</u>.

A database refers to an organized or structured collection of data that is typically stored on a computer system and it can be accessed in various ways. Also, each database has a unique formatting and this may result in data inconsistency.

In Computer science, a clean data is essential in obtaining the following:

  • Data consistency
  • Data integrity
  • Reliable solutions and decisions.

Furthermore, spreadsheets are designed and developed with all kinds of tools that can be used to produce a clean data that are consistent and reliable for analysis.

In this context, clear formats is a kind of tool that is used by data analysts to create a clean and consistent visual appearance for their spreadsheets.

Read more on database here: brainly.com/question/15334693

8 0
2 years ago
Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
Anika [276]

Answer:

They include;

1. MAAG Pump Systems,

2. Automatik Plastics Machinery,

3. Gala Industries,

4. Reduction Engineering Scheer,

5. Ettlinger Kunststoffmaschinen and

6. XanTec EDV- und Steuerungstechnik

Explanation:

The MAAG group consists of six companies specialized in different aspects of polymer production. They provide their services to petrochemical, pharmaceutical and food production companies. They produce pellets, gear pumps, filtration systems and components, pelletizers, etc.

They have more than 1000 staff and their offices are located in about 11 countries of the world.

5 0
2 years ago
[20 pts] Assume that Bob wants to send a secret message to Alice using RSA encryption. (a) [5pts] (Key generation step) Assume A
Kitty [74]

Answer:

a)Yes Alice can pick 11 has value for her public exponent e

b) The value of d when the public exponent e = 3 is 37

c) The cipher c of the Bob’s message m =2 is 8

d) The cipher c of the Bob’s message m =3 is 18

e) The value of m if c = 3  and the public exponent e = 7 is 16

Explanation:

Find attached the explanation

3 0
3 years ago
Other questions:
  • What was the purpose of the Declaration of Independence and what led to it​
    10·1 answer
  • An _________ is a phrase formed from the first letters of words in a set phrase or series of words a. Acronymic sentence c. Basi
    7·2 answers
  • Can you subnet the 172.16.128.0/17 network address to support this subnet?
    6·1 answer
  • What does software alone enable a computer to do? connect to the Internet control processing speeds interact with the user manag
    11·2 answers
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    7·2 answers
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • How does recorded audio stay on an audio tape
    12·1 answer
  • Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
    6·1 answer
  • What does the following process describe?
    10·1 answer
  • Type of Factor Beginning Frog Count Simulation 1 (Low) Simulation 2 (High)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!