Include a Tornado class that stores the following information in private member variables:   Name Data Type Description location string County of event category enum {TBD,F0,F1,F2,F3,F4,F5} Fujita Scale rating (NOAA) damage double Dollars of damage received   Your class must have the following constructors and member functions: Default Constructor: The constructor should create an empty Tornado object, set the location to “”, the category to F0, and the damage to 0. 2nd Constructor: The second constructor should accept the Tornado’s location, category, and damage as arguments. Accessors: Appropriate accessor functions to return the values stored in an object’s member variables. Mutators: Appropriate mutator functions to set the values stored in an object’s member variables.  Validate the data as is appropriate for the field To test your class, write a program (main) that creates an array of 5 Tornado objects.  Initialize the array when you define it, using an initialization list and the data shown below.   McCurtain, F2, 450000 Red River, F3, 1410750 Camp County, F2, 750250 Cass County, TBD, 295000 Display a menu that allows the user to: Print the information for all items in a table, using a word for the type. At the bottom of the table, print the total of the damage column. Edit a particular item (Print a numbered list of the array items, Read a number from the user, Allow the user to enter data for the item, Store the data into the array). Update the damage for all array items (display the name of each item and the current damage amount as you read the new damage amount)

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question

 

Include a Tornado class that stores the following information in private member variables:

 

Name

Data Type

Description

location

string

County of event

category

enum {TBD,F0,F1,F2,F3,F4,F5}

Fujita Scale rating (NOAA)

damage

double

Dollars of damage received

 

Your class must have the following constructors and member functions:

  • Default Constructor: The constructor should create an empty Tornado object, set the location to “”, the category to F0, and the damage to 0.
  • 2nd Constructor: The second constructor should accept the Tornado’s location, category, and damage as arguments.
  • Accessors: Appropriate accessor functions to return the values stored in an object’s member variables.
  • Mutators: Appropriate mutator functions to set the values stored in an object’s member variables.  Validate the data as is appropriate for the field

To test your class, write a program (main) that creates an array of 5 Tornado objects.  Initialize the array when you define it, using an initialization list and the data shown below.  

McCurtain, F2, 450000

Red River, F3, 1410750

Camp County, F2, 750250

Cass County, TBD, 295000

Display a menu that allows the user to:

  1. Print the information for all items in a table, using a word for the type. At the bottom of the table, print the total of the damage column.
  2. Edit a particular item (Print a numbered list of the array items, Read a number from the user, Allow the user to enter data for the item, Store the data into the array).
  3. Update the damage for all array items (display the name of each item and the current damage amount as you read the new damage amount)

Design your class and program by completing the CS 250 OOP Design Document.  Give the description of the class along with a brief description of what is to be stored in each member variable and the purpose of each member function.  Also give a description of what the main program will do.  You’ll need to include time estimates for design, coding each function, program testing, and total time. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 8 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I am so sorry. The programming code needs to be c++

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,