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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education