Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

Lorem ipsum dolor sit amet, consectetur adipiscing elit.Morbi adipiscing gravdio, sit amet suscipit risus ultrices eu.Fusce viverra neque at purus laoreet consequa.Vivamus vulputate posuere nisl quis consequat.

cs304 assignment no 3 solution and discussion

CS304- Object Oriented Programming

CS304 Assignment No. 03
SEMESTER Spring 2018

 

Problem Statement

Consider yourself working as a software engineer in a marketing company of both hardware and software. The IT manager has given you a task to model a part of their simple advertising system. In this system, there will be four classes named Item, Sales, hwItem (Hardware Item), swItem (Software Item)

Steps to follow:

  1. Create a base class Item that should store the title of the item (a string) and its price (a float).
  2. Then create another base class called Sales which should contain an array of three floats so that it can record the sale in rupees of a particular item for the last three months.
  3. After that derive two classes hwItem (hardware item) and swItem (software item) from both Item and Sales The hwItem class should hold category of the item and its original manufacturer (om), whereas the swItem class should contain the type of the software and the Operating System (os) under which it works.
  4. Each class should have its own getData() and displayData() functions to input and output data respectively.

Leave a reply

About admin

Skip to toolbar