Description:
A LapTop object consists of three private bjects: a CPU, a Screen and a Modem. Each of these objects, in turn, has a
weight, performance (speed or size), and cost. Here is the
prototype for the Screen class, as an example:
// ---------------- class Screen prototype-----------------
class Screen
{
private:
double weight,
size,
cost;
public:
Screen(double w=3, double s=13.3, double c=215);
double GetCost();
double GetWeight();
double GetSize();
};
Using this prosaic description of the four classes, as well as
the following sample main(), and resultant output from that same
sample main(), construct all four classes, and demonstrates that
your classes work by actually running the main() supplied and
producing the output that is shown.
// ---------------- main --------------------
int main()
{
CPU cpu1, cpu2(3.4, 233, 945), cpu3(2.9, 350, 1295);
Screen scr1, scr2(1.3, 10.3, 306), scr3(1.8, 14.1, 520);
Modem mdm1, mdm2(.026, 56000, 160);
LapTop lap1,
lap2(cpu1, scr3, mdm2),
lap3(cpu3, scr2),
lap4(cpu2, scr2, mdm2),
lap5(cpu3, scr3, mdm2);
lap1.ShowSpecs();
lap2.ShowSpecs();
lap3.ShowSpecs();
lap4.ShowSpecs();
lap5.ShowSpecs();
return 0;
}
/* ----------- run produced by above main() -----------------
This computer has a 300 Mhz CPU
with a 13.3" display
and a 33600 bps modem.
It costs $1592 and weighs 5.55 pounds.
This computer has a 300 Mhz CPU
with a 14.1" display
and a 56000 bps modem.
It costs $1938 and weighs 4.326 pounds.
This computer has a 350 Mhz CPU
with a 10.3" display
and a 33600 bps modem.
It costs $1720 and weighs 4.25 pounds.
This computer has a 233 Mhz CPU
with a 10.3" display
and a 56000 bps modem.
It costs $1411 and weighs 4.726 pounds.
This computer has a 350 Mhz CPU
with a 14.1" display
and a 56000 bps modem.
It costs $1975 and weighs 4.726 pounds.
----------------------------------------------- */
This is a bit of detective work, but it shouldn't be too
hard because all of the vital information is included.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation, you can report it to: abuse@rentacoder.com.
|