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 are the advantages of mine shaft gear and the disadvantaged​
romanna [79]

Answer:

One sheave means that you are using a single drum winder. They are the worst! Double drum winders control easier, brake better and are much more efficient. They save time ( two skips or cages) and can be clutched to perform faster shift transport. A single drum is slow, unbalanced and can be a nightmare if it trips out during hoisting. If the brake system is not perfect it can be a real hairy experience. For a runaway single drum, there is no counterbalance effect. It always runs to destruction. With a double drum, the driver still has a chance to control the winder to a certain extent and he has two sets of brakes to rely on. A single sheave could also mean a shaft with a single compartment. No second means of escape unless there are ladders or stairways. Not a very healthy situation.

Those are just a few points. I am sure much more can be said in favor of a double drum winder and two or more sheaves in the headgear. Most of the shafts I have worked at have multiple winders and up to ten compartments. They all have a small single drum service winder for emergencies and moves of personnel during shift times. They are referred to as the Mary - Annes. Apparently, the name originated in the U.K. where an aristocratic mine owner named the first such winder after his mistress.

Explanation:

<em>Hope you got it </em>

<em>If you have any question just ask me</em>

<em>If you think this is the best answer please mark me as BRAINLIEST</em>

5 0
3 years ago
Write an algorithm to create a customer’s bill for a company. The company sells only five different products. TV, VCR, Remote Co
alukav5142 [94]

Answer:

so

tv= 400$

VCR= $220

remote controller= $35

CD Player= $280

Tap recorder= $90

so total = $1025 total

here 8% sale tax increase so is 82$ so

1025-82$ = 943 total amount

increase or decrease tax according to your question :)

6 0
3 years ago
On Windows computers, applications from Microsoft will not look and act the same as windows and menus from the operating system.
Andrej [43]

True.

Windows is an operating system built by Microsoft. Chrome and Android are operating systems built by Google. MacOS (Macbook pro etc) and iOS (iPhone, iPad, Apple Watch etc) are operating systems built by Apple.

Engineers build applications or apps for all of the above operating systems (OS). For example, Microsoft Word menus will look slightly different on Windows vs on a Mac. The underlying functionality maybe the same but the way it looks may have subtle differences.

Think of the OS as the foundation of a building. Once you have the foundation, you can build a house, a skyscraper, an office building etc depending on what you want to build.

6 0
2 years ago
Read 2 more answers
What is the software that provides the mechanisms to access a database called?
NeX [460]

Answer:

Database Management Software.

Explanation:

The software that provides  the mechanism to access the database is called  Database Management Software.There are two types databases  SQL  and  No SQL.There are various types of  database Management Software  present online for ex:-My SQL,Microsoft SQL server,Microsoft Access,Postgres SQL,Mongo DB etc.

3 0
3 years ago
For those that play pc games how do you go outside in The Sims 2?
yanalaym [24]

Answer:

My sister plays a lot of the sims 4 but I do recall she also played the Sims 2 so when she would go outside she would command them to do that.

Explanation:

If this does not work I would suggest you get a video that can explain it better than I possibly would? Considering the Sims 2 was made a while back you would maybe want somebody with a little more experience.

5 0
2 years ago
Read 2 more answers
Other questions:
  • Scratch and grinding marks on sedimentary rocks indicate which type of environment?
    6·1 answer
  • Allie needs to add a long row of numbers. She should enter a
    13·2 answers
  • When might be the best time to start saving for retirement?
    5·2 answers
  • This isn't a homework question but rather a technological problem. I connected my device to the motherboard but it will not dete
    5·2 answers
  • Translation of a file into a coded format that occupies less space than the original file is called
    15·1 answer
  • What are the text or graphics that are lighter than the main text located in a document's background called?
    10·1 answer
  • This isn't a question
    8·1 answer
  • Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
    11·1 answer
  • Which of the following do nylon and Kevlar fibers have in common?
    14·1 answer
  • Cyber vulnerabilities to dod systems may include
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!