Sunday, August 2, 2020

CS304 Assignment No.3 Solution with Download file




















Assignment No. 03
Semester: Spring 2020
CS304- Object Oriented Programming  


Total Marks: 20

Due Date: 6th August 2020  

Objective
The objective of this assignment is:
To give you the idea of practical implementation of C++ Inheritance and Polymorphism.


Uploading instructions:

  • Your assignment should be in .CPP format (Any other formats like scan images, PDF, zip, doc, rar and bmp etc. will not be accepted).
  • Save your assignment with your ID (e.g. bc000000000.CPP).
  • No assignment will be accepted through email.

Rules for Marking:

It should be clear that your assignment will not get any credit if:

·         The assignment is submitted after due date.
·         The submitted assignment does not open, execute or file is corrupted.
·         Your assignment is copied from internet, handouts or from any other student.
      (Strict disciplinary action will be taken in this case).

Lectures Covered:

This assignment covers Lecture # 22-29.

Assignment No. 03


A public sector university has its bookstores throughout the country from where students can buy study material like handouts, lecture DVDs, books etc. Each bookstore maintains the stock data of study material. This data is helpful for the university to maintain information about quantity, price and other data of each item available at different bookstores.  Keeping in view the above scenario,  you are required to write a C++ program that should contain three classes: StockItem, Handouts and Lecture_DVD, where StockItem should be base class and Handouts and Lecture_DVD should be its derived classes.

You are required to use concept of Polymorphism to generate the sample output. The detail of data members and member functions for each class is provided in the given table.





Class
Data Members
Member Functions
StockItem
  • Name of Item
  • Quantity of Item
  • Price of Item
  • Course_Code
  • Course_Name

  • Default Constructor
  • Setter functions to set values of data members of this class.
  • Getter functions to get the values of data members of this class.
  • A function to set data of a stock item
  • A function to display data of a stock item
Handouts
  • No_Pages
  • Author
  • Default Constructor
  • A function to set data of handouts
  • A function to display data of handouts.
Lecture_DVD
  • Total minutes
  • Total Lectures
  • Default Constructor
  • A function to set data of DVD.
  • A function to display data of DVD.






Solution Guidelines:
  • You have to use concept of Polymorphism to generate the sample output.











                                                                               Best of luck!



NOTE:  Do not put any query on MDB about this assignment, if you have any query then email at cs304@vu.edu.pk.  Furthermore, if any student found cheating from any other student or from online forums then he/she will be awarded ZERO right away and strict disciplinary action will be taken against the student.




Deadline: Your assignment must be uploaded/submitted on or before  6th August 2020




3 comments: