Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
- The assignment is submitted after due date.
- The assignment is submitted via email.
- The assignment is copied from Internet or from any other student.
- The submitted assignment does not open or file is corrupt.
- It is in some format other than.cpp.
Note:You are supposed to submit your assignment in .cpp format. Any other formats like scan images, PDF, zip, doc, rar and bmp etc will not be accepted.All types of plagiarism are strictly prohibited.
For any query about the assignment, contact atCS304@vu.edu.pk
The objective of this assignment is:
- To give you the idea of practical implementation of Inheritance in CPP.
Suppose METRO Cash & Carry Pakistan has given you a task to develop an automatic checkout system in C++. All items are identifiable by means of a merchandise computer code (barcode) and the item name. Groceries are either sold in packs or by weight. Packed items have fixed prices. The price of groceries sold by weight is calculated by multiplying the weight by the current price per kilogram. As a software developer your task is to develop the classes needed to represent the products first and organize them hierarchically according to the UML diagram given on next page.
Price per piece
Price per rupee
Figure: UML forMETRO Cash & Carry Pakistan
Tasks for you:
- Make a base class named Item then define its private and public members. Define a constructor with parameters for both data members (Barcode, Item Name). You should add default values for the parameters to provide a default constructor for the class. In addition to the access methods setCode() and getCode(), you are also required to define the methods scanner() and printer(). These methods will simply output item data on screen or read the data of an item from the keyboard.
- Define two derived classes PackedFood and FreshFood. In addition to the Item class data, the PackedFood class should contain the unit price. The FreshFood class should contain a weight and a price per kilogram as data members. You are required to define a constructor with parameters providing default-values for all data members in both classes. Also define the access methods needed for the new data members.
- Make the main() function then test the classes in it, that creates two objects each of the types Item, PackedFood and FreshFood. One object of each type should be fully initialized in the object definition. You can use the default constructor to create the other object. The get() and set() methods and the scanner() method should be well written and the printer() method should display the items on screen.
ENG301 Assignment No 3 Fall 2017Dear Students, Here you can read or Download ENG301 - Business CommunicationAssignment No 3 Solution and Discussion of Semester Fall 2017. Assignment Due Date is 02 February, 2018. Total Marks are 20. Lectures covered in this Assignment are from Lecture No 23 to Lecture No 37. ENG301 Assignment Solution File has been added. We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions.
|ENG301 Assignment No 2 Solution and discussion Fall 2017|
ENG301 Assignment Instructions:
- Upload your assignments in a proper format, i.e. MS word file. Corrupt files will be awarded zero marks.
- The assignments should be zoomed in at 100%.
- Please avoid plagiarism; plagiarized work will be marked zero.
- After the due date, the assignments submitted via email would not be entertained.
- Please avoid submitting copied assignments; otherwise, such a case would be referred to the discipline committee.
- The font color should be preferably black and font size 12 Times New Roman.
ENG301 Assignment Question No 1:As the Sales Director of Sapphire & Co., write a circular letter to introduce your new Allama Iqbal Town branch to your customers.
ENG301 Assignment Question No 2:Match the special terms for meetings in column A with their definitions in column B and write the correct definitions in column C.
Special terms for Meetings and Committee :
|ENG301 Assignment Question No 2 - Special terms for Meetings and Committee|
ENG301 Assignment No 3 Solution Fall 2017You can see the Sample Preview of ENG301 Assignment No 3 Solution provided by (Virtual Study Solutions) below. Click on Download Button to Download Solution File in Your PC. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us below for Updates.
ENG301 Assignment Solution Sample Preview
|ENG301 Assignment No 3 Solution Fall 2017 Sample Preview|