We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Problem Statement:

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.

                                                                             Items

Properties:

Bar code

Item Name

Methods:

setbarCode()

getbarCode()

...

scanner()

printer()

 

 

 

 

 

 

 

 

 

                                    PackedFood                                                                                            FreshFood

 

Properties:

Price per piece

 

Methods:

getPrice()

setPrice()

...

scanner()

printer()  

Properties:

Weight

Price per rupee

 

Methods:

setWght()

getWght()

...

scanner()

printer()

 

 

 

 

 

 

 

 

 

Figure: UML for METRO Cash & Carry Pakistan

 

 

 

 

Tasks for you:

  1. 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.
  2. 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.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1642

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

plzz start discussion???

CS304 Assignment # 3 solution..
https://youtu.be/4KHmhKG0ctQ

plz solution cs304 Assignment n0 3

We are trying to solve Assignment

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.

 

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.

&

.•°How to Download past papers from study groups°•.

 

Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 

any solution plzzzz

i have  complete solution of cs304 ass#3..

see it at here

https://youtu.be/4KHmhKG0ctQ

Bhai jaan wrong output ha 

Jab ap kisi item ka barcode or item ka name keyboard se enter kro tab ye check kare k kia item or barcode same hain tab ja kar iss ki output show ho gi

complete solution for clearing the concept 

https://youtu.be/O9xE5ndWtCo

Wrong assignment... i challenged you..

RSS

Latest Activity

Gulzar Ahmed joined + M.Tariq Malik's group
15 minutes ago
+ ՏhehαrZααD + liked + !! "AS" !!'s discussion Jis Tarah ..
1 hour ago
Pronoun liked zobialatif's discussion hazrat ali says
1 hour ago
٥ دن updated their profile
2 hours ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Jis Tarah ..
2 hours ago
Siddiq khan kakar liked + M.Tariq Malik's discussion PAK301 Pakistan Studies Short Notes, PAK301 Solved Subjective Questions, PAK301 Solved MCQs
3 hours ago
Siddiq khan kakar liked + M.Tariq Malik's group PAK301 Pakistan Studies
3 hours ago
+ ! ! JS ! ! + posted a discussion
3 hours ago
Siddiq khan kakar liked Siddiq khan kakar's discussion RIP
3 hours ago
Kashif Iqbal added 2 discussions to the group FIN624 Islamic Mode of Financing
3 hours ago
+ ! ! JS ! ! + liked + Iuuoɔǝut +'s discussion جلوۂ عشق حقیقت تھی حسن مجاز بہانہ تھا
3 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Baat Karna ...
3 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Ghalti...
3 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Yaha Har Cheez ..
3 hours ago
+ ! ! JS ! ! + liked +!!!StRaNGeR!!! +'s discussion ﺁﭖ ﺩﻝ ﺟﻮﺋﯽ ﮐﯽ ﺯﺣﻤﺖ ﻧﮧ ﺍﭨﮭﺎﺋﯿﮟ ، ﺟﺎﺋﯿﮟ
3 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Alfaaz Ki Nisbat..
3 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Jis Tarah ..
3 hours ago
Siddiq khan kakar posted discussions
3 hours ago
+ ! ! JS ! ! + replied to + !! "AS" !!'s discussion Jis Tarah ..
3 hours ago
Zain Arshad replied to + M.Tariq Malik's discussion ENG201 Business and Technical English Writing Assignment No 01 Fall 2019 Solution & Discussion in the group ENG201 Business and Technical English Writing
3 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service