Terminal Exam Spring 2021- Part 2of2 .docx - COMSATS...

This preview shows page 1 - 2 out of 5 pages.

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY,ISLAMABAD.Department of Computer ScienceTerminal Examination Spring-2021Subjective PartInstructors:Dr. Mukhtar Azeem, Ms. Saneeha Aamir, Ms. Nusrat ShaheenC. Code & Title:CSC 241Object Oriented ProgrammingDated:12th, July , 2021Maximum Marks: 30Time Allowed:60 minutes1.Suppose you are designing a “shopManagement” application in Java using OOP.Your shopmanagement application contains the following classes.a.Shop (For the management operations of products like insertion, deletion etc.…)b.ShopItem (Contains the details related to products)c.Mobilephone (sample product of shop)d.LED (sample product of shop)
You are required to create class “shoppingCart”. This class should contain the following methods alongwith constructor, accessor and mutator methods.a.buyMobile//buy mobile and update shop and cartListb.buyLED//buy LED and update shop and cartListc.cancelOrder//Cancel Item and update cart and Total priced.writeCartToFile// Write the Cart to the File.e.checkOut//Remove all the bought items from the Cart Listf.showDetailCart//display cart items2.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 5 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Dr Muhammad Afzal
Tags

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture