shopping in a grocery store solution

$25.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

4.2/5 - (5 votes)

We will write a simulation of someone shopping in a grocery store for produce (fruits and vegetables).
An input file will contain the code number and the weight of the item being purchased. A database will
contain the code number, the name of the item (such as “Pineapple”) and the price per pound.
Create a class called ProduceItem with three instance variables for the code (String), name (String) and
price (float). Include appropriate constructors, get/set methods and overrides of class Object.
Create a class for the database. It should contain an array which will store all the ProcudeItems (that will
be read in from a file). This class should contain, among others, methods that will return the name and
the price of an item with a given code:
String getName(String code);
float getPrice(String code);
The output of the program should be a JFrame (a separate GUI class) that serves as a receipt for the
customer. It should contain, one per line, the name, price, weight and total cost of each item, and at the
end the total cost of all purchases.
Submit the project through Blackboard by the due date for full credit. Note that you will be uploading
multiple files (i.e., the main application, the ProduceItem, the database, and the Receipt GUI.