Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ Programming Assignment 5 Step 1: This file contains just a program shell in which you will write all the programming statements needed to

image text in transcribedUsing C++ Programming

Assignment 5 Step 1: This file contains just a program shell in which you will write all the programming statements needed to complete the program described below. Here is a sample of the current contents of areas.cpp 1 // Assignment 5 is to compute the area (s) WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM PUT YOUR NAME HERE. 2 3 4 // INCLUDE ANY NEEDED HEADER FILES HERE 5 using namespace std;l 7 int main) 9// DEFINE THE NAMED CONSTANT PI HERE AND SET ITS VALUE TO 3.14159 10 11 // DECLARE ALL NEEDED VARIABLES HERE. GIVE EACH ONE A DESCRIPTIVE 12// NAME AND AN APPROPRIATE DATA TYPE 13 14// WRITE STATEMENTS HERE TO DISPLAY THE 4 MENU CHOICES 15 16// WRITE A STATEMENT HERE TO INPUT THE USERS MENU CHOICE 17 18// WRITE STATEMENTS TO OBTAIN ANY NEEDED INPUT INFORMATION 19// AND COMPUTE AND DISPLAY THE AREA FOR EACH VALID MENU CHOICE 20 / IF AN INVALID MENU CHOICE WAS ENTERED, AN ERROR MESSAGE SHOULD 21 /BE DISPLAYED 23 return 0 24 ) Step 2: Design and implement the areas.cpp program so that it correctly meets the program specifications given below Specifications: Sample Run Program to calculate areas of objects Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices 1 -- square 2 circle 3 - right triangle 4 - quit 1square 2 -- circle 3 -- right triangle 4quit Radius of the circle: 3.0 Area 28.2743 . If the user selects choice 1, the program should find the area of a square . If the user selects choice 2, the program should . If the user selects choice 3, the program should . If the user selects choice 4, the program should . If the user selects anything else (i.e., an invalid find the area of a circle find the area of a right triangle quit without doing anything choice) an appropriate error message should be printed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

2. Identify and choose outcomes to evaluate a training program.

Answered: 1 week ago

Question

6. Conduct a cost-benefit analysis for a training program.

Answered: 1 week ago