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

Assignmentoverviewthis assignment consists of implementing

Assignment Overview This assignment consists of implementing an application using the techniques learned in the first half of the course. Examples on how to use file operations, random number generation, the standard tem ...

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

Assignmentwhen writing c programs include comments in your

Assignment When writing C++ programs include comments in your code, make the program readable by indenting, use meaningful variable and function names, and produce meaningful output. This assignment will be to write a te ...

Write a c program that requests the name of any cartoon

Write a C program that requests the name of any cartoon character from the user, then does the following with that name (use printf for each): a. Displays it enclosed in double quotes. b. Displays it in a field 24 charac ...

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

Assignmentwhen writing c programs include comments in your

Assignment When writing C++ programs include comments in your code, make the program readable by indenting, use meaningful variable and function names, and produce meaningful output. This assignment will be to write a bm ...

Writing a c code its a beginner level code design a class

Writing a C++ code, its a beginner level code. Design a class house that defines a house on a street. A house has a house number and an (x,y) location, where x and y are numbers between -10 and 10. the key member is plot ...

1 three employees in a company are up special pay increase

1. Three employees in a company are up special pay increase. You are given a file, with the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consists of an employee ...

Assessment taskthis coursework will allow you to

Assessment Task: This coursework will allow you to investigate some of the issues involved in writing threaded programs. You are to write a series of simple programs in C/C++ that will run under Linux, to illustrate how ...

C projectphase 11- you need to take input from user study

C project Phase 1 1- You need to take input from user study year (proper value check from 1 to 4) 2- Take input semester (proper value check 1 to 8) 3- Calculate GPA (use Loop, calculate GPA for semester 1,2,3...) Exampl ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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