The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Need help!!!!! is java code plz!!
Inheritance and
Interfaces
Overview
In this homework, you will implement a system that
A????1 reads in an inventory file,
A????1 prints the inventory to the console, and
A????1 ships items.
It requires you to use Java classes and interfaces rather than static functions as we did in previous homework.
Basic Application
In this homework, you will create the basic application that reads input from a datafile and writes the results to the console. In the next homework, you will enhance the application by adding database functionality.
Program Flow
The following pseudocode shows the required flow of the program.
Begin
for each  line  in  inventory   file   do
determine  inventory   type
based  on  type,  create   object   to   hold   data  (FoodItem   or  Household   Item)
populate   item  with  appropriate  data  (weight,  etc)
store  in  inventory   list
end
for each  item  in  inventory   list   do
print  item  Â
end
for each  household  item  in  inventory  do
determine   shipping  cost print  shipping   cost
End
end
Program Output
For the supplied input file, the output should be as shown below (dates will be different!)
Item banana
-- Shelf Life: 5
-- Remove from Shelf: Thu Mar 12 22:07:56 CDT 2015
-- Calories: 200.00
Item bread
-- Shelf Life: 10
-- Remove from Shelf: Tue Mar 17 22:07:56 CDT 2015
-- Calories: 120.00
Item toaster
-- Weight: 5
Item washer
-- Weight: 200
Item toaster shipped. Shipping cost is $100.00
Item washer shipped. Shipping cost is $4,000.00
Business Rules
There are two types of items tracked in the system: food items and household (durable) items.
A????1 Food Items
Food items are edible (we hope!) and perishable. An edible item has calories, while a perishable item has a limited shelf life. The item must be removed from the shelf when it expires. The expi- ration date is simply
expiration date = date placed in inventory + shelf life in days
A????1 Household Items
Household items have unlimited shelf life, so they do not have an expiration date. They do have (sometimes substantial) weight. Their weight is taken into account when determining the ship- ping cost. The shipping cost is also higher when the item is shipped on the weekend.
UML Diagram
The classes and interfaces required for the application have been defined for you, and are shown in the diagram below. Dotted lines indicate interfaces while solid lines indicate inheritance. Your application must implement all classes and interfaces as shown.
Â
Javadoc
The Javadoc for the application has been generated for you and is available in Blackboard as a zip file. Unzip the file into a directory and then open the file index.html to view the documentation.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll