Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Owner Of Carrefour Market Wants A Program That Allows Him To Keep Track Of His Products Sales. He Wants To Know Which Products Are

The Owner Of Carrefour Market Wants A Program That Allows Him To Keep Track Of His Products Sales. He Wants To Know Which Products Are Needed More In The Market So That Hecan Get More Of It. To Achieve His Goal, You Are Required To Write A Program Using Linked Lists And List Iterators. Your Program Must Include The Following Classes: A) Class Product:

image text in transcribedimage text in transcribedimage text in transcribedJAVA

 

The owner of Carrefour market wants a program that allows him to keep track of his products sales. He wants to know which products are needed more in the market so that hecan get more of it. To achieve his goal, you are required to write a program using Linked Lists and list Iterators. Your program must include the following classes: a) Class Product: contains id number of the product (of type int), its name (of type String), and its expiry date (of type int), its status (String of 2 possible values: "expired" or "not expired"), and sold number (of type int). The class should provide constructor, setters and getters for the attributes, and toString method toprint out instance variables. b) Class Carrefour: this class should be developed using Linked List and List Iterator. The products are sorted according to their ID number (from smallest to largest). You program should provide the following functionalities. (each functionality should be implemented as a method): save a new product to the list. ( keep the list sorted) change the status of the product. Take the product ID as parameter and check if its expired date is less than "2020", then change the type to "expired". Otherwise print "no changes". retrieve the expiry date of a product (takes ID as parameter) delete a product from the list (ID as parameter) arrangebySoldnumber (places most sold product first, then least. i.e. sorts descending order) arrangebyStatus (Places expired first, then not expired) requestOrder (). It orders a product with minimum soldenumber and status="not expired". (Print the info of the requested product) Displayall it prints out all the products in the market with their corresponding info

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting

Authors: Ray H. Garrison, Eric W. Noreen, Peter C. Brewer

13th Edition

978-0073379616, 73379611, 978-0697789938

More Books

Students also viewed these Accounting questions