NPTEL Programming in C++ Week5 Assignment-5 Solutions 2021 | Swayam

 


Evo Fox (by Amkette) Fireblade Gaming Wired Keyboard with LED Backlit, 19 Anti-Ghosting Keys and Windows Lock Key (TKL) (Black)

Rating - 3.8 to 4

Price - 800₹ to 1000₹

for latest information click - https://amzn.to/3q8vvsv




W5_Programming-Qs1

square::square(int _side):rectangle(_side,_side){}   //Line-1

cube::cube(int _side):rectangle(_side,_side){}   //Line-2

 :rectangle(_width,_height),length(_length){}    //Line-3



W5_Programming-Qs2

 :Employee(_eid,_name),department(_department){}   //Line-1


 Person::show()     //Line-2


 Employee::show()   //Line-3


W5_Programming-Qs3

  class Cube :public Volume,Area{   //Line-1

  public:

    Cube(int _edge) :Volume(_edge),Area(_edge){}

    int getVolume(){Volume::getVal();}   //Line-2

    int getArea(){Area::getVal();}       //Line-3


};


W5_Programming-Qs4

  public:

    Computer(string _brand,int _ram_size,int _hd_size,double _speed)

       :brand(_brand),RAM(_ram_size),HardDisk(_hd_size),Processor(_speed){}  //Line-1

    void getRAMSize{RAM:getRAMSize();}     //Line-2

    void getHDSize{HardDisk::getHDSize();}    //Line-3

    void getSpeed{Processor::getSpeed();}         //Line-4


No comments:

Powered by Blogger.