Defining a computer Class using Multiple Inheritance
$15-20 USD
完了済み
投稿日: 20年以上前
$15-20 USD
完了時にお支払い
Assume you have the following ComputerScren class:
Class ComputerScreen
{
public:
ComputerScreen(char*,long,int,int);
void ShowScreen(void);
private:
char TypeScreen[32];
long Colors;
int xResolution;
int yResolution;
};
Develop the code for the constructor and any prototyped functions. This code should be based on subsequent information.
Likewise assume you have the following MotherBoard class:
Class MotherBoard
{
public:
Motherboard(int,int,int);
void ShowMother(void);
private:
int Processor;
int Speed;
int RAM;
};
Develop the code for the constructor and any prototyped functions. This code should be based on subsequent information.
Using these two classes derive a Computer class that has the following attributes:
Class Computer
{
public:
Computer(char*,int,float,char*,long,int,int,int,int,int);
void ShowComputer(void);
private:
char Name[64];
int HardDisk;
float Floppy;
};
Modify the Computer class to allow for multiple inheritance from the ComputerScreen and MotherBoard classes. Invoke the constructors for each inherited class as appropriate.
After each class has been modified as appropriate, develop the constructors and class functions, develop a main function that will create appropriate instances of the Computer class and user the following data for one of the objects:
Name: Compaq
HardDisk: 40
Floppy: 1.44
Processor: 486
Speed: 1000
RAM: 256
Type Screen: VGA
Colors: 16000000
xResolution: 1280
yResolution: 960
The output functions should display the information as follows:
Type: Compaq
Hard Disk: 40 Gigabytes
Floppy Disk: 1.44 Megabytes
Processor: 486
Speed: 1000 Mhz
RAM: 256 Megabytes
Colors: 16000000
Resolution: 1280 by 960
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
## Platform
The program should compile and work using MS-Visual C++ 5.0.