Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assessment task focuses on the following Learning Outcomes: * Effectively use object - oriented design and understand appropriate methodology. * Comprehend the fundamental data
This assessment task focuses on the following Learning Outcomes:
Effectively use objectoriented design and understand appropriate methodology.
Comprehend the fundamental data structures and their computational process
Create Graphic User Interfaces GUI by employing appropriate libraries and interfaces
Design, develop and test objectoriented programs according to language principles
Write Java code to develop an App.
The system which you are about to build is to represent a variety of product types available at a supermarket. They will all have a common method to produce multiple lines of output suitable to be included in a docket. However, depending on what type of product it is this output will contain different sorts of information.
For all product items, the output for a docket should include the following. Feel free to make the format you like.
The ID of product item
The name of the product item
The type of the product item
The price of the item
The amount of the price which is a taxcomponent explained next
Depending on the type of product, the following additional information should be output:
If it is a Fresh Fruit item, the weight of the item eg the Apple is grams, the watermelon is grams
If it is a Packaged item, the quantity of units in the package eg eggs in the package, chocolate bars in the bag and a useby date.
The taxcomponent is calculated from the price of the item, and the following rates are used:
For Fresh Fruit items,
For Packaged items, of the price Detailed Tasks
Create a class named Product to be the superclass of all products. It should have suitable constructors to aid with polymorphic behaviour and contain suitable attributes to store the information that is common to all product types but whose values vary for each instance of that product type and appropriate accessors. The class also contains a generic toString method. Briefly explain this class in your recorded video.
Create a class to represent Fresh Fruit items. It should be a subclass of the class Product. Ensure that it contains appropriate attributes to store additional information specific to fresh fruit. Ensure that there is a suitable constructor, and mutators to set all values appropriately and that there are appropriate accessors to obtain all information relevant to fresh fruit. Override toString method so that it returns all relevant information related to the fresh fruit. Briefly explain some features of this class in your recorded video.
Create a class to represent Packaged items. It should be a subclass of the class made in task Ensure that it contains appropriate attributes to store additional information specific to packaged items. Ensure that there is a suitable constructor, and mutators to set all values appropriately and that there are appropriate accessors to obtain all information relevant to packaged items. Override toString method so that it returns all relevant information related to the Packaged items. Briefly explain some features of this class in your recorded video.
Draw a UML class diagram for the abovementioned product classes. Show all attributes, methods, and proper relationships between classes. Include the diagram and its description in the readme file. Also, include the program output screenshots in the readme file with brief descriptions.
Create a driver class that will have a main method and the following functionalities. Explain the key functions and implementations you reckon in your recorded video.
Create at least Fresh Fruits items and packaged items and display them on the
console as a product menu for customers.
Ask users to select the products that they want to buy by selecting the IDs. Interaction
should be ongoing and happen over the command console or Graphical User Interface GUI Users can buy multiple products in one purchase.
Display the docket on the console which will have information about the total amount due including tax and total tax value in each purchasetransaction
Use File IO as the product database for at least Fresh Fruits items and packaged items to make your program more powerful and robust.
Produce a mins recorded video with your clear voice of explanation and your face clearly shown in the recording. The recording for part should be a demo of:
how your case study code can be compiled and run in your IDE with output
where about in the code you have applied the OOP concepts and what are those
concepts.
what are the main features of your code and how the code can be further improved.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started