Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

problem1. prepare down the class 'Weather' to contain the following:-

i) Data members: humidity, air_pressure, atmospheric_temperature and wind_speed all of datatype double

ii) A no-argument constructor to initialize the humidity to zero

iii) An overloaded constructor with one parameter to assign a value to the air_pressure

iv) An overloaded constructor with two parameters to assign values to the humidity and air_pressure

v) An overloaded constructor with three parameters to assign values to the humidity, air_pressure, atmospheric_temperature

vi) An overloaded constructor with four parameters to assign values to each of the variables declared

vii) Set methods for each of the data members

viii) Get methods for each of the variables         
 
problem2. prepare down an application to perform the following:-

i) Create a 'Weather' object using the no-argument constructor

ii) Create a second 'Weather' object using the overloaded constructor one parameter

iii) Create a third 'Weather' object using the overloaded constructor two parameters

iv) Create a fourth 'Weather' object using the overloaded constructor three parameters

v) Create a fifth 'Weather' object using the overloaded constructor four parameters

vi) Use the set methods to assign values to each of the variables declared

vii) Display the values using message dialog(s)

problem3. prepare down the interface 'WaterResource' to contain the following:-

Method 'water_amount' of datatype double

Method 'resource_name' of datatype String                                         

problem4. prepare down the class 'Reservoir' which implements the interface 'WaterResource' and contains the following:-

i) String variables: name and location

ii) Variables: capacity and amount_available of datatype double

iii) Set methods for each of the variables

iv) Get methods for each of the variables

v) Override the two methods inherited from the interface WaterResource

problem5. prepare down the class 'Lake' which inherits from the class 'Reservoir' and contains the following:-

i) A variable area_size of datatype double

ii) A set method to assign value to the area_size

iii) A get method to return the value of area_size

iv) Override the method water_amount inherited from superclass Reservoir to indicate the amount of water available in the lake.

v) Override the method resource_name  inherited from superclass  Reservoir  to return the name of the resource, that is lake.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M95887

Have any Question? 


Related Questions in C/C++

1 we know that from ece 109 to calculate the

1. We know that from ECE 109, to calculate the equivalent resistance of a network of resistors in series in parallel are given by: Write a C++ program that asks the user to input values for resistors (as many as they wou ...

Computer sciencewhere do you think c and coding games in c

Computer Science Where do you think C++ and coding games in C++ is headed in the next five years? How about in the next 10 years? Do you think there are any significant improvements that need to be made to the code to en ...

Projectdecision statementsdirections read carefully and

Project: Decision Statements Directions (Read CAREFULLY and follow COMPLETELY): - Create the following programs in C++ that perform the purpose described and show the sample output (with user input where applicable). - I ...

Intro to programming in c programming assignmentassignment

Intro to Programming in C Programming Assignment Assignment purpose: User defined functions, pointers, Menu driven program A Company needs to create software for their new line of phone applications. Customers will have ...

Write a program that reads numbers from cin and then sums

Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered. Construct three versions of this program, using the while ,do - while , and for loops. Add the following to your program: ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Programming assignmentwrite a c program that allows the

PROGRAMMING ASSIGNMENT Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents). The p ...

Assignment part acreate a checkbook program using c

Assignment (part a) Create a Checkbook program using C : • Create a Check structure. Include:   o Check number (should be an integer).   o Date (use type char[ ]).   o To   o Amount   o Description • Add functions to:   ...

Programming assignment 5write a c program that allows the

PROGRAMMING ASSIGNMENT #5 Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents, not ...

Discussionwhile loops versus for loops please respond to

Discussion "While Loops versus For Loops" Please respond to the following: • Suppose you are writing a C++ program that plays a commercial video continuously within a kiosk at your favorite shopping mall within your home ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen