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++

Write a program that calculates mileage reimbursement for a

Write a program that calculates mileage reimbursement for a salesperson at a rate of $0.35 per mile. Your program should interact with the user in this manner: MILEAGE REIMBURSEMENT CALCULATOR Enter beginning odometer re ...

Question 1you are facing the following problem you are

Question 1 You are facing the following problem: You are given a robot and your task is to "guide" the robot through a 2-dimensional maze such that the robot can reach a desired goal state. Assume that the maze is define ...

Writeacprogramthatwilluseloopstoperformeachofthefollowingtas

Write a C++ program that will use loops to perform each of the following tasks: 1. Ask the user for two characters from the keyboard and read them into char variables. Determine which input is larger and which is smaller ...

You need to program a microprocessor that would have a

You need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands from the PC via the Zigbee to control mot ...

1 requirementsin this assignment you can unleash your

1. REQUIREMENTS In this assignment, you can unleash your imaginations and use OpenGL with C/C++ programming to produce a scene(s) that represents what you envision could possibly be seen under the sea. Please note that a ...

Please use codeblockslist the program and the output on the

Please use codeblocks List the program and the output on the command line Eg #include #include using namespace std; int main() { floatjohno = 0.5; size_t size = 24; vector array(size); for(inti=0; i     { johno = johno + ...

Assignment simple 5-card poker gamein this assignment you

Assignment: Simple 5-Card Poker Game In this assignment, you will develop a simple poker game, complete with basic AI, using the object oriented programming principles discussed in class. Flow of Play Your poker game's p ...

Problem 1overview for problem 1a of this assignment you

Problem #1 Overview: For problem 1(a) of this assignment, you will need a C++ compiler. In order to receive credit, your program must compile and run; and you must provide the actual source code file so that I can compil ...

Descriptionnbspin this assignment you will write a c

Description:  In this assignment you will write a C++ program that finds the kth largest number among a set of N numbers. It will implement the solution using two different algorithms and measure the time elapsed during ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate