Hello I'm a beginner and I want to make a program with calculate Meteorologic measurements:
base classe - time( hour, minutes).
Derivative class - Meteorologic measurements: temperature, dampness, wind.
CONDITION
1. In a task must be to mould a given "real" object with a attributes as sponger class;
2.Must be compose class with a member - variables (characterizations) and a member - functions
(methods), implicational in the task;
3.The declaration and the implementation of the classes be separation in different files,
kindred to project;
4.Builder as a constructor and destructor;
5.Must be to Compose a method "Set()" for fix the characteristics of the objects;
6.Must be to Compose a method "Print()" for unsealing the characteristics of the objects;
7.Must be to Compose a methods for return of the worths of each characteristic.
Primer.
If be to declarated characteristic name, age, number the methods to be defined:
GetName(), GetAge(), GetNumber();
8.Production and eliminating of objects from the class by an source to the data of the keyboard
and / Or File and check of correctness of the input files
9.To take/bring out on the outputed screen a appropriatel message, if not thesearched object
is seen;
10.To be a demonstration work of the program with proper text exemplars;
11. To make a briefly description of the defaine classes and functions;
I must to run this program on Dev-C++
I hope that there are people who will do this task. Thanks
1. It doesn't make sense for temperature, humidity, or wind to be derived from time. Temperature isn't a kind of time, and neither are humidity nor wind.
2. I don't understand anything in that list above. Did you use machine translation or something?
I want instanse for time 8:30 min. temperature is 15; humidity is 30; wind is 7;
10:30 min. temperature is 21; humidity is 15; wind is 4;
......................................................................................
14:30 min. temperature is 27; humidity is 10; wind is 6; and so, so.
........................................................................................................
the space of the time comig in 2 hours. The temperature from 6:30 raising 1degree into a hour and, after 16:30 lower 1degree. The humidity in 6:30 from 30 lower 2 into a hour and, after 16:30 raising 2. And wind in 6:30 from 12 lower 2 into a hour and, after 16:30 raising 2. So if you can in It to show information at each time be is better.
Base class (BC) - time( hour, minutes).
Derivative class - Meteorologic measurements: temperature, humidity, wind.
This is:
class time {
≡ int h, m;
}
→→→
class weather : time
class CTime
{
public:
CTime();
CTime(int AHours, int AMinutes, int ASeconds);
CTime(CTime & other); // copy konstruktor
virtual ~CTime();
public:
// return code of mistake if data is invalid
int SetHour(int AHour);
int SetMinute(int AMnute);
int SetSeconds(int ASeconds);
// Return a respective value
int GetHour();
int GetMinute();
int GetSeconds();
public:
// Bring in file outFile, if ShowPrefixes is 1 take the names of variables, or onle value them
virtualvoid ShowData(FILE * outFile, int ShowPrefixes);
// read on inFile - if ShowPrefixes is 1 and inFile == stdin (keybaord) to take urge report
virtualint ReadData(FILE * inFile, int ShowPrefixes);
protected:
int nHour;
int nMinute;
int nSecond;
};
class CWeather
{
public:
CWeather();
CWeather(int AHours, int AMinutes, int ASeconds, float ATemperature, float AMoisture, float AWindSpeed, char * AWindDirection);
CWeather(CWeather & other); // copy konstruktor
~CWeather();
public:
int SetTemperature(float ATemperature);
int SetMoisture(float AMoisture);
int SetWindSpeed(float AWindSpeed);
int SetWindDirection(char * AWindDirection);
float GetTemperature();
float GetMoisture();
float GetWindSpeed();
char * GetWinDirection();
public:
// bring in file outFile, if ShowPrefixes is 1 bring the names of variable, or otherwise onle value their
virtualvoid ShowData(FILE * outFile, int ShowPrefixes);
// read from inFile - if ShowPrefixes is 1 and inFile == stdin (keyboard) it bring urge message
virtualint ReadData(FILE * inFile, int ShowPrefixes);
protected:
float fTempereture;
float fMoisture;
float fWindSpeed;
char * strWindDirection; // trqbva da se zadelq pamet v SetWindDirection i da se osvobojdava v destruktora
}