SlideShare a Scribd company logo
1 of 55
food,banana,5,200.0
food,bread,10,120.0
household,toaster,5
household,washer,200
Inheritance and Interfaces
Overview
In this homework, you will implement a system that
• reads in an inventory file,
• prints the inventory to the console, and
• 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.
• 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
• 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 as a
zip file. Unzip the file into a directory and then open the file
index.html to view the
documentation.
javadoc/.DS_Store
javadoc/allclasses-
frame.htmlAll ClassesEdibleFoodItemHouseholdItemInventoryIt
emInventoryManagerPerishableShippable
javadoc/allclasses-
noframe.htmlAll ClassesEdibleFoodItemHouseholdItemInventor
yItemInventoryManagerPerishableShippable
javadoc/constant-values.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll ClassesConstant Field Values
ContentsSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll Classes
javadoc/deprecated-list.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll ClassesDeprecated API
ContentsSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll Classes
javadoc/help-doc.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll ClassesHow This API Document Is Organized
This API (Application Programming Interface) document has
pages corresponding to the items in the navigation bar,
described as follows.
Package
Each package has a page that contains a list of its classes and
interfaces, with a summary for each. This page can contain six
categories:Interfaces
(italic)ClassesEnumsExceptionsErrorsAnnotation Types
Class/Interface
Each class, interface, nested class and nested interface has its
own separate page. Each of these pages has three sections
consisting of a class/interface description, summary tables, and
detailed member descriptions:Class inheritance diagramDirect
SubclassesAll Known SubinterfacesAll Known Implementing
ClassesClass/interface declarationClass/interface
descriptionNested Class SummaryField SummaryConstructor
SummaryMethod SummaryField DetailConstructor
DetailMethod Detail
Each summary entry contains the first sentence from the
detailed description for that item. The summary entries are
alphabetical, while the detailed descriptions are in the order
they appear in the source code. This preserves the logical
groupings established by the programmer.
Annotation Type
Each annotation type has its own separate page with the
following sections:Annotation Type declarationAnnotation Type
descriptionRequired Element SummaryOptional Element
SummaryElement Detail
Enum
Each enum has its own separate page with the following
sections:Enum declarationEnum descriptionEnum Constant
SummaryEnum Constant Detail
Tree (Class Hierarchy)
There is a Class Hierarchy page for all packages, plus a
hierarchy for each package. Each hierarchy page contains a list
of classes and a list of interfaces. The classes are organized by
inheritance structure starting with java.lang.Object. The
interfaces do not inherit from java.lang.Object.When viewing
the Overview page, clicking on "Tree" displays the hierarchy
for all packages.When viewing a particular package, class or
interface page, clicking "Tree" displays the hierarchy for only
that package.
Deprecated API
The Deprecated API page lists all of the API that have been
deprecated. A deprecated API is not recommended for use,
generally due to improvements, and a replacement API is
usually given. Deprecated APIs may be removed in future
implementations.
Index
The Index contains an alphabetic list of all classes, interfaces,
constructors, methods, and fields.
Prev/Next
These links take you to the next or previous class, interface,
package, or related page.
Frames/No Frames
These links show and hide the HTML frames. All pages are
available with or without frames.
All Classes
The All Classes link shows all classes and interfaces except
non-static nested types.
Serialized Form
Each serializable or externalizable class has a description of its
serialization fields and methods. This information is of interest
to re-implementors, not to developers using the API. While
there is no link in the navigation bar, you can get to this
information by going to any serialized class and clicking
"Serialized Form" in the "See also" section of the class
description.
Constant Field Values
The Constant Field Values page lists the static final fields and
their values.
This help file applies to API documentation generated using the
standard doclet.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll Classes
javadoc/Householditems/.DS_Store
javadoc/Householditems/Householditems/.DS_Store
javadoc/Householditems/Householditems/Householditems/Edibl
e.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Interface EdibleAll Known Implementing
Classes:FoodItempublic interface Edible
Interface for items that are edible
Method Summary
All Methods Instance MethodsAbstract MethodsModifier and
TypeMethod and DescriptiondoublegetCalories() Method
DetailgetCaloriesdouble getCalories()Returns:calories in the
itemSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/FoodI
tem.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Class
FoodItemjava.lang.Objectuh.edu.cis2348.InventoryItemuh.edu.c
is2348.FoodItemAll Implemented Interfaces:Edible,
Perishablepublic class FoodItem
extends InventoryItem
implements Edible, Perishable
Encapsulates food items
Field Summary
Fields Modifier and TypeField and Descriptionprivate
double_caloriesprivate int_shelfLifeprivate
java.util.Date_stockedDateprivate java.util.Date_unusableDate
Fields inherited from
class uh.edu.cis2348.InventoryItem_nameConstructor Summary
Constructors Constructor and
DescriptionFoodItem(java.lang.String name,
int shelfLife,
double calories)
Create a new food item
Method Summary
All Methods Instance MethodsConcrete MethodsModifier and
TypeMethod and DescriptiondoublegetCalories()
Returns the calories in the food item
java.util.DategetExpiredDate()
This function returns the expiration date of the product based on
its shelf life and the day that it was added to inventory
intgetShelfLife()
Returns the number of days that a product can remain on the
shelves before being thrown out
java.lang.StringtoString()
Methods inherited from
class uh.edu.cis2348.InventoryItemgetNameMethods inherited
from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
wait, wait, waitField Detail_shelfLifeprivate final int
_shelfLife_caloriesprivate final double
_calories_stockedDateprivate final java.util.Date
_stockedDate_unusableDateprivate final java.util.Date
_unusableDateConstructor
DetailFoodItempublic FoodItem(java.lang.String name,
int shelfLife,
double calories)
Create a new food item
Parameters:name - shelfLife - calories - Method
DetailgetCaloriespublic double getCalories()
Returns the calories in the food item
Specified by:getCalories in
interface EdibleReturns:getShelfLifepublic int getShelfLife()
Description copied from interface: Perishable
Returns the number of days that a product can remain on the
shelves before being thrown out
Specified by:getShelfLife in interface PerishableReturns:the
shelf life in
daysgetExpiredDatepublic java.util.Date getExpiredDate()
Description copied from interface: Perishable
This function returns the expiration date of the product based on
its shelf life and the day that it was added to inventory
Specified by:getExpiredDate in interface PerishableReturns:the
expiration date, equal to the stock date plus the shelf
lifetoStringpublic java.lang.String toString()Overrides:toString
in class InventoryItemSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/Hous
eholdItem.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Class
HouseholdItemjava.lang.Objectuh.edu.cis2348.InventoryItemuh.
edu.cis2348.HouseholdItemAll Implemented
Interfaces:Shippablepublic class HouseholdItem
extends InventoryItem
implements Shippable
Encapsulates durable items for the house, such as toasters and
dryers
Field Summary
Fields Modifier and TypeField and Descriptionprivate
int_weight
the weight of the item, used in calculating the shipping cost
Fields inherited from
class uh.edu.cis2348.InventoryItem_nameConstructor Summary
Constructors Constructor and
DescriptionHouseholdItem(java.lang.String name,
int weight)
Constructor
Method Summary
All Methods Instance MethodsConcrete MethodsModifier and
TypeMethod and
DescriptiondoublecalculateShippingCost(java.lang.String shipD
ateString)
Calculates the shipping cost of the item based on its weight
and whether it was shipped on a Saturday or Sunday.
private booleanisWeekend(java.util.Date shipDate)
Determines if the given date is on a weekend.
java.lang.StringtoString()
Methods inherited from
class uh.edu.cis2348.InventoryItemgetNameMethods inherited
from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
wait, wait, waitField Detail_weightprivate final int _weight
the weight of the item, used in calculating the shipping cost
Constructor
DetailHouseholdItempublic HouseholdItem(java.lang.String na
me,
int weight)
Constructor
Parameters:name - weight - Method
DetailcalculateShippingCostpublic double calculateShippingCos
t(java.lang.String shipDateString)
throws java.text.ParseException
Calculates the shipping cost of the item based on its weight
and whether it was shipped on a Saturday or Sunday.
cost = weight * 20 + fee, where fee = $10.00 if on a Saturday
or Sunday, 0 otherwise
Specified by:calculateShippingCost in
interface ShippableParameters:shipDateString - - the date of
shipment, in 'mm-dd-yyyy'
formReturns:Throws:java.text.ParseExceptionisWeekendprivate
boolean isWeekend(java.util.Date shipDate)
Determines if the given date is on a weekend.
Parameters:shipDate -
Returns:toStringpublic java.lang.String toString()Overrides:toSt
ring in class InventoryItemSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/Inven
toryItem.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Class
InventoryItemjava.lang.Objectuh.edu.cis2348.InventoryItemDir
ect Known Subclasses:FoodItem, HouseholdItempublic abstract
class InventoryItem
extends java.lang.Object
Abstract class that is the base of all inventory items
Field Summary
Fields Modifier and TypeField and Descriptionprotected
java.lang.String_nameConstructor Summary
Constructors Constructor and
DescriptionInventoryItem(java.lang.String name)
Constructs a new inventory item
Method Summary
All Methods Instance MethodsConcrete MethodsModifier and
TypeMethod and
Descriptionjava.lang.StringgetName() java.lang.StringtoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
wait, wait, waitField Detail_nameprotected java.lang.String
_nameConstructor
DetailInventoryItempublic InventoryItem(java.lang.String name
)
Constructs a new inventory item
Parameters:name - Method
DetailgetNamepublic java.lang.String getName()Returns:the
name of the
objecttoStringpublic java.lang.String toString()Overrides:toStri
ng in class java.lang.ObjectSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/Inven
toryManager.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Class
InventoryManagerjava.lang.Objectuh.edu.cis2348.InventoryMan
agerpublic class InventoryManager
extends java.lang.Object
The main class for the inventory management system
Field Summary
Fields Modifier and TypeField and Description(package private)
java.util.ArrayList<InventoryItem>_inventory
the list of all items in inventory
Constructor Summary
Constructors Constructor and
DescriptionInventoryManager() Method Summary
All Methods Static MethodsInstance MethodsConcrete
MethodsModifier and TypeMethod and Descriptionprivate
voidloadInventory()
Loads inventory from the database
private voidloadInventory(java.lang.String fileName)
Reads in the inventory file, storing the contents in the
_inventory list.
static voidmain(java.lang.String[] args)
This is the entry point for the application.
voidprintInventory()
Prints the inventory to the console
voidshipAllHouseholdItems(java.lang.String dateString)
This function finds all the household inventory items in the
inventory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, waitField
Detail_inventoryjava.util.ArrayList<InventoryItem> _inventory
the list of all items in inventory
Constructor
DetailInventoryManagerpublic InventoryManager()Method
Detailmainpublic static void main(java.lang.String[] args)
This is the entry point for the application. It does the following
loads the inventory file
prints the inventory to the console
ships all the household items in inventory, with a ship
date of Dec. 24, 2014.
Parameters:args -
shipAllHouseholdItemspublic void shipAllHouseholdItems(java.
lang.String dateString)
This function finds all the household inventory items in the
inventory. It then
calls calculateShippingCost on each of the items and prints the
result.
Parameters:dateString - - the ship date in the format 'mm-dd-
yyyy'loadInventoryprivate void loadInventory(java.lang.String f
ileName)
throws java.io.FileNotFoundException
Reads in the inventory file, storing the contents in the
_inventory list.
Each line from the given CSV file is parsed as a single
inventory element.
The input file can contain two inventory types: food and
household goods.
The format for a line in the CSV file is different for each type.
Column 1Column 2Column 3Column 4foodnameshelf
lifecalorieshouseholdnameweight(NA)Parameters:fileName -
full path to inventory CSV
fileThrows:java.io.FileNotFoundExceptionloadInventoryprivate
void loadInventory()
Loads inventory from the database
printInventorypublic void printInventory()
Prints the inventory to the console
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/packa
ge-frame.htmluh.edu.cis2348
InterfacesEdiblePerishableShippable
ClassesFoodItemHouseholdItemInventoryItemInventoryManager
javadoc/Householditems/Householditems/Householditems/packa
ge-summary.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev PackageNext P
ackageFramesNo FramesAll ClassesPackage uh.edu.cis2348
Interface Summary InterfaceDescriptionEdible
Interface for items that are edible
Perishable
Methods to be implemented by items that are perishable
Shippable
Interface for items that can be shipped
Class Summary ClassDescriptionFoodItem
Encapsulates food items
HouseholdItem
Encapsulates durable items for the house, such as toasters and
dryers
InventoryItem
Abstract class that is the base of all inventory items
InventoryManager
The main class for the inventory management system
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev PackageNext P
ackageFramesNo FramesAll Classes
javadoc/Householditems/Householditems/Householditems/packa
ge-tree.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll ClassesHierarchy For Package uh.edu.cis2348
Class Hierarchyjava.lang.Object
uh.edu.cis2348.InventoryItemuh.edu.cis2348.FoodItem
(implements uh.edu.cis2348.Edible,
uh.edu.cis2348.Perishable)uh.edu.cis2348.HouseholdItem
(implements
uh.edu.cis2348.Shippable)uh.edu.cis2348.InventoryManager
Interface
Hierarchyuh.edu.cis2348.Edibleuh.edu.cis2348.Perishableuh.ed
u.cis2348.ShippableSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll Classes
javadoc/Householditems/Householditems/Householditems/Peris
hable.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Interface PerishableAll Known Implementing
Classes:FoodItempublic interface Perishable
Methods to be implemented by items that are perishable
Method Summary
All Methods Instance MethodsAbstract MethodsModifier and
TypeMethod and Descriptionjava.util.DategetExpiredDate()
This function returns the expiration date of the product based on
its shelf life and the day that it was added to inventory
intgetShelfLife()
Returns the number of days that a product can remain on the
shelves before being thrown out
Method DetailgetShelfLifeint getShelfLife()
Returns the number of days that a product can remain on the
shelves before being thrown out
Returns:the shelf life in
daysgetExpiredDatejava.util.Date getExpiredDate()
This function returns the expiration date of the product based on
its shelf life and the day that it was added to inventory
Returns:Date objectSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/Householditems/Householditems/Householditems/Shipp
able.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
uh.edu.cis2348
Interface ShippableAll Known Implementing
Classes:HouseholdItempublic interface Shippable
Interface for items that can be shipped
Method Summary
All Methods Instance MethodsAbstract MethodsModifier and
TypeMethod and
DescriptiondoublecalculateShippingCost(java.lang.String shipD
ateString) Method
DetailcalculateShippingCostdouble calculateShippingCost(java.l
ang.String shipDateString)
throws
java.text.ParseExceptionThrows:java.text.ParseExceptionSkip
navigation
linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla
ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
| MethodDetail: Field | Constr | Method
javadoc/index.html
javadoc/index-files/index-1.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
CcalculateShippingCost(String) - Method in class
uh.edu.cis2348.HouseholdItem
Calculates the shipping cost of the item based on its weight
and whether it was shipped on a Saturday or Sunday.
calculateShippingCost(String) - Method in interface
uh.edu.cis2348.ShippableCEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-10.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
SshipAllHouseholdItems(String) - Method in class
uh.edu.cis2348.InventoryManager
This function finds all the household inventory items in the
inventory.
Shippable - Interface in uh.edu.cis2348
Interface for items that can be shipped
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-11.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
TtoString() - Method in class
uh.edu.cis2348.FoodItemtoString() - Method in class
uh.edu.cis2348.HouseholdItemtoString() - Method in class
uh.edu.cis2348.InventoryItemCEFGHILMPSTU_Skip
navigation linksPackageClassTreeDeprecatedIndexHelpPrev
LetterNext LetterFramesNo FramesAll Classes
javadoc/index-files/index-12.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
Uuh.edu.cis2348 - package
uh.edu.cis2348CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-13.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
__calories - Variable in class
uh.edu.cis2348.FoodItem_inventory - Variable in class
uh.edu.cis2348.InventoryManager
the list of all items in inventory
_name - Variable in class
uh.edu.cis2348.InventoryItem_shelfLife - Variable in class
uh.edu.cis2348.FoodItem_stockedDate - Variable in class
uh.edu.cis2348.FoodItem_unusableDate - Variable in class
uh.edu.cis2348.FoodItem_weight - Variable in class
uh.edu.cis2348.HouseholdItem
the weight of the item, used in calculating the shipping cost
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-2.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
EEdible - Interface in uh.edu.cis2348
Interface for items that are edible
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-3.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
FFoodItem - Class in uh.edu.cis2348
Encapsulates food items
FoodItem(String, int, double) - Constructor for class
uh.edu.cis2348.FoodItem
Create a new food item
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-4.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
GgetCalories() - Method in interface
uh.edu.cis2348.EdiblegetCalories() - Method in class
uh.edu.cis2348.FoodItem
Returns the calories in the food item
getExpiredDate() - Method in class
uh.edu.cis2348.FoodItemgetExpiredDate() - Method in interface
uh.edu.cis2348.Perishable
This function returns the expiration date of the product based on
its shelf life and the day that it was added to inventory
getName() - Method in class
uh.edu.cis2348.InventoryItemgetShelfLife() - Method in class
uh.edu.cis2348.FoodItemgetShelfLife() - Method in interface
uh.edu.cis2348.Perishable
Returns the number of days that a product can remain on the
shelves before being thrown out
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-5.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
HHouseholdItem - Class in uh.edu.cis2348
Encapsulates durable items for the house, such as toasters and
dryers
HouseholdItem(String, int) - Constructor for class
uh.edu.cis2348.HouseholdItem
Constructor
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-6.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
IInventoryItem - Class in uh.edu.cis2348
Abstract class that is the base of all inventory items
InventoryItem(String) - Constructor for class
uh.edu.cis2348.InventoryItem
Constructs a new inventory item
InventoryManager - Class in uh.edu.cis2348
The main class for the inventory management system
InventoryManager() - Constructor for class
uh.edu.cis2348.InventoryManagerisWeekend(Date) - Method in
class uh.edu.cis2348.HouseholdItem
Determines if the given date is on a weekend.
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-7.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
LloadInventory(String) - Method in class
uh.edu.cis2348.InventoryManager
Reads in the inventory file, storing the contents in the
_inventory list.
loadInventory() - Method in class
uh.edu.cis2348.InventoryManager
Loads inventory from the database
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-8.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
Mmain(String[]) - Static method in class
uh.edu.cis2348.InventoryManager
This is the entry point for the application.
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/index-files/index-9.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
PPerishable - Interface in uh.edu.cis2348
Methods to be implemented by items that are perishable
printInventory() - Method in class
uh.edu.cis2348.InventoryManager
Prints the inventory to the console
CEFGHILMPSTU_Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext
LetterFramesNo FramesAll Classes
javadoc/overview-tree.html
JavaScript is disabled on your browser.
Skip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll ClassesHierarchy For All Packages
Package Hierarchies:
uh.edu.cis2348
Class Hierarchyjava.lang.Object
uh.edu.cis2348.InventoryItemuh.edu.cis2348.FoodItem
(implements uh.edu.cis2348.Edible,
uh.edu.cis2348.Perishable)uh.edu.cis2348.HouseholdItem
(implements
uh.edu.cis2348.Shippable)uh.edu.cis2348.InventoryManager
Interface
Hierarchyuh.edu.cis2348.Edibleuh.edu.cis2348.Perishableuh.ed
u.cis2348.ShippableSkip navigation
linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo
FramesAll Classes
javadoc/package-list
uh.edu.cis2348
javadoc/script.js
function show(type)
{
count = 0;
for (var key in methods) {
var row = document.getElementById(key);
if ((methods[key] & type) != 0) {
row.style.display = '';
row.className = (count++ % 2) ? rowColor : altColor;
}
else
row.style.display = 'none';
}
updateTabs(type);
}
function updateTabs(type)
{
for (var value in tabs) {
var sNode = document.getElementById(tabs[value][0]);
var spanNode = sNode.firstChild;
if (value == type) {
sNode.className = activeTableTab;
spanNode.innerHTML = tabs[value][1];
}
else {
sNode.className = tableTab;
spanNode.innerHTML = "<a href="javascript:show("+
value + ");">" + tabs[value][1] + "</a>";
}
}
}
javadoc/stylesheet.css
/* Javadoc style sheet */
/*
Overall document style
*/
@import url('resources/fonts/dejavu.css');
body {
background-color:#ffffff;
color:#353833;
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
font-size:14px;
margin:0;
}
a:link, a:visited {
text-decoration:none;
color:#4A6782;
}
a:hover, a:focus {
text-decoration:none;
color:#bb7a2a;
}
a:active {
text-decoration:none;
color:#4A6782;
}
a[name] {
color:#353833;
}
a[name]:hover {
text-decoration:none;
color:#353833;
}
pre {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
}
h1 {
font-size:20px;
}
h2 {
font-size:18px;
}
h3 {
font-size:16px;
font-style:italic;
}
h4 {
font-size:13px;
}
h5 {
font-size:12px;
}
h6 {
font-size:11px;
}
ul {
list-style-type:disc;
}
code, tt {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
margin-top:8px;
line-height:1.4em;
}
dt code {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
}
table tr td dt code {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
vertical-align:top;
padding-top:4px;
}
sup {
font-size:8px;
}
/*
Document title and Copyright styles
*/
.clear {
clear:both;
height:0px;
overflow:hidden;
}
.aboutLanguage {
float:right;
padding:0px 21px;
font-size:11px;
z-index:200;
margin-top:-9px;
}
.legalCopy {
margin-left:.5em;
}
.bar a, .bar a:link, .bar a:visited, .bar a:active {
color:#FFFFFF;
text-decoration:none;
}
.bar a:hover, .bar a:focus {
color:#bb7a2a;
}
.tab {
background-color:#0066FF;
color:#ffffff;
padding:8px;
width:5em;
font-weight:bold;
}
/*
Navigation bar styles
*/
.bar {
background-color:#4D7A97;
color:#FFFFFF;
padding:.8em .5em .4em .8em;
height:auto;/*height:1.8em;*/
font-size:11px;
margin:0;
}
.topNav {
background-color:#4D7A97;
color:#FFFFFF;
float:left;
padding:0;
width:100%;
clear:right;
height:2.8em;
padding-top:10px;
overflow:hidden;
font-size:12px;
}
.bottomNav {
margin-top:10px;
background-color:#4D7A97;
color:#FFFFFF;
float:left;
padding:0;
width:100%;
clear:right;
height:2.8em;
padding-top:10px;
overflow:hidden;
font-size:12px;
}
.subNav {
background-color:#dee3e9;
float:left;
width:100%;
overflow:hidden;
font-size:12px;
}
.subNav div {
clear:left;
float:left;
padding:0 0 5px 6px;
text-transform:uppercase;
}
ul.navList, ul.subNavList {
float:left;
margin:0 25px 0 0;
padding:0;
}
ul.navList li{
list-style:none;
float:left;
padding: 5px 6px;
text-transform:uppercase;
}
ul.subNavList li{
list-style:none;
float:left;
}
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav
a:link, .bottomNav a:active, .bottomNav a:visited {
color:#FFFFFF;
text-decoration:none;
text-transform:uppercase;
}
.topNav a:hover, .bottomNav a:hover {
text-decoration:none;
color:#bb7a2a;
text-transform:uppercase;
}
.navBarCell1Rev {
background-color:#F8981D;
color:#253441;
margin: auto 5px;
}
.skipNav {
position:absolute;
top:auto;
left:-9999px;
overflow:hidden;
}
/*
Page header and footer styles
*/
.header, .footer {
clear:both;
margin:0 20px;
padding:5px 0 0 0;
}
.indexHeader {
margin:10px;
position:relative;
}
.indexHeader span{
margin-right:15px;
}
.indexHeader h1 {
font-size:13px;
}
.title {
color:#2c4557;
margin:10px 0;
}
.subTitle {
margin:5px 0 0 0;
}
.header ul {
margin:0 0 15px 0;
padding:0;
}
.footer ul {
margin:20px 0 5px 0;
}
.header ul li, .footer ul li {
list-style:none;
font-size:13px;
}
/*
Heading styles
*/
div.details ul.blockList ul.blockList ul.blockList li.blockList
h4, div.details ul.blockList ul.blockList ul.blockListLast
li.blockList h4 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
margin:0 0 6px -8px;
padding:7px 5px;
}
ul.blockList ul.blockList ul.blockList li.blockList h3 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
margin:0 0 6px -8px;
padding:7px 5px;
}
ul.blockList ul.blockList li.blockList h3 {
padding:0;
margin:15px 0;
}
ul.blockList li.blockList h2 {
padding:0px 0 20px 0;
}
/*
Page layout container styles
*/
.contentContainer, .sourceContainer, .classUseContainer,
.serializedFormContainer, .constantValuesContainer {
clear:both;
padding:10px 20px;
position:relative;
}
.indexContainer {
margin:10px;
position:relative;
font-size:12px;
}
.indexContainer h2 {
font-size:13px;
padding:0 0 3px 0;
}
.indexContainer ul {
margin:0;
padding:0;
}
.indexContainer ul li {
list-style:none;
padding-top:2px;
}
.contentContainer .description dl dt, .contentContainer .details
dl dt, .serializedFormContainer dl dt {
font-size:12px;
font-weight:bold;
margin:10px 0 0 0;
color:#4E4E4E;
}
.contentContainer .description dl dd, .contentContainer .details
dl dd, .serializedFormContainer dl dd {
margin:5px 0 10px 0px;
font-size:14px;
font-family:'DejaVu Sans Mono',monospace;
}
.serializedFormContainer dl.nameValue dt {
margin-left:1px;
font-size:1.1em;
display:inline;
font-weight:bold;
}
.serializedFormContainer dl.nameValue dd {
margin:0 0 0 1px;
font-size:1.1em;
display:inline;
}
/*
List styles
*/
ul.horizontal li {
display:inline;
font-size:0.9em;
}
ul.inheritance {
margin:0;
padding:0;
}
ul.inheritance li {
display:inline;
list-style:none;
}
ul.inheritance li ul.inheritance {
margin-left:15px;
padding-left:15px;
padding-top:1px;
}
ul.blockList, ul.blockListLast {
margin:10px 0 10px 0;
padding:0;
}
ul.blockList li.blockList, ul.blockListLast li.blockList {
list-style:none;
margin-bottom:15px;
line-height:1.4;
}
ul.blockList ul.blockList li.blockList, ul.blockList
ul.blockListLast li.blockList {
padding:0px 20px 5px 10px;
border:1px solid #ededed;
background-color:#f8f8f8;
}
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList
ul.blockList ul.blockListLast li.blockList {
padding:0 0 5px 8px;
background-color:#ffffff;
border:none;
}
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
margin-left:0;
padding-left:0;
padding-bottom:15px;
border:none;
}
ul.blockList ul.blockList ul.blockList ul.blockList
li.blockListLast {
list-style:none;
border-bottom:none;
padding-bottom:0;
}
table tr td dl, table tr td dl dt, table tr td dl dd {
margin-top:0;
margin-bottom:1px;
}
/*
Table styles
*/
.overviewSummary, .memberSummary, .typeSummary,
.useSummary, .constantsSummary, .deprecatedSummary {
width:100%;
border-left:1px solid #EEE;
border-right:1px solid #EEE;
border-bottom:1px solid #EEE;
}
.overviewSummary, .memberSummary {
padding:0px;
}
.overviewSummary caption, .memberSummary caption,
.typeSummary caption,
.useSummary caption, .constantsSummary caption,
.deprecatedSummary caption {
position:relative;
text-align:left;
background-repeat:no-repeat;
color:#253441;
font-weight:bold;
clear:none;
overflow:hidden;
padding:0px;
padding-top:10px;
padding-left:1px;
margin:0px;
white-space:pre;
}
.overviewSummary caption a:link, .memberSummary caption
a:link, .typeSummary caption a:link,
.useSummary caption a:link, .constantsSummary caption a:link,
.deprecatedSummary caption a:link,
.overviewSummary caption a:hover, .memberSummary caption
a:hover, .typeSummary caption a:hover,
.useSummary caption a:hover, .constantsSummary caption
a:hover, .deprecatedSummary caption a:hover,
.overviewSummary caption a:active, .memberSummary caption
a:active, .typeSummary caption a:active,
.useSummary caption a:active, .constantsSummary caption
a:active, .deprecatedSummary caption a:active,
.overviewSummary caption a:visited, .memberSummary caption
a:visited, .typeSummary caption a:visited,
.useSummary caption a:visited, .constantsSummary caption
a:visited, .deprecatedSummary caption a:visited {
color:#FFFFFF;
}
.overviewSummary caption span, .memberSummary caption
span, .typeSummary caption span,
.useSummary caption span, .constantsSummary caption span,
.deprecatedSummary caption span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
padding-bottom:7px;
display:inline-block;
float:left;
background-color:#F8981D;
border: none;
height:16px;
}
.memberSummary caption span.activeTableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
margin-right:3px;
display:inline-block;
float:left;
background-color:#F8981D;
height:16px;
}
.memberSummary caption span.tableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
margin-right:3px;
display:inline-block;
float:left;
background-color:#4D7A97;
height:16px;
}
.memberSummary caption span.tableTab, .memberSummary
caption span.activeTableTab {
padding-top:0px;
padding-left:0px;
padding-right:0px;
background-image:none;
float:none;
display:inline;
}
.overviewSummary .tabEnd, .memberSummary .tabEnd,
.typeSummary .tabEnd,
.useSummary .tabEnd, .constantsSummary .tabEnd,
.deprecatedSummary .tabEnd {
display:none;
width:5px;
position:relative;
float:left;
background-color:#F8981D;
}
.memberSummary .activeTableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
position:relative;
float:left;
background-color:#F8981D;
}
.memberSummary .tableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
position:relative;
background-color:#4D7A97;
float:left;
}
.overviewSummary td, .memberSummary td, .typeSummary td,
.useSummary td, .constantsSummary td, .deprecatedSummary td
{
text-align:left;
padding:0px 0px 12px 10px;
width:100%;
}
th.colOne, th.colFirst, th.colLast, .useSummary th,
.constantsSummary th,
td.colOne, td.colFirst, td.colLast, .useSummary td,
.constantsSummary td{
vertical-align:top;
padding-right:0px;
padding-top:8px;
padding-bottom:3px;
}
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
background:#dee3e9;
text-align:left;
padding:8px 3px 3px 7px;
}
td.colFirst, th.colFirst {
white-space:nowrap;
font-size:13px;
}
td.colLast, th.colLast {
font-size:13px;
}
td.colOne, th.colOne {
font-size:13px;
}
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
.overviewSummary td.colOne, .overviewSummary th.colOne,
.memberSummary td.colFirst, .memberSummary th.colFirst,
.memberSummary td.colOne, .memberSummary th.colOne,
.typeSummary td.colFirst{
width:25%;
vertical-align:top;
}
td.colOne a:link, td.colOne a:active, td.colOne a:visited,
td.colOne a:hover, td.colFirst a:link, td.colFirst a:active,
td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link,
td.colLast a:active, td.colLast a:visited, td.colLast a:hover,
.constantValuesContainer td a:link, .constantValuesContainer td
a:active, .constantValuesContainer td a:visited,
.constantValuesContainer td a:hover {
font-weight:bold;
}
.tableSubHeadingColor {
background-color:#EEEEFF;
}
.altColor {
background-color:#FFFFFF;
}
.rowColor {
background-color:#EEEEEF;
}
/*
Content styles
*/
.description pre {
margin-top:0;
}
.deprecatedContent {
margin:0;
padding:10px 0;
}
.docSummary {
padding:0;
}
ul.blockList ul.blockList ul.blockList li.blockList h3 {
font-style:normal;
}
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman",
Times, serif;
}
td.colLast div {
padding-top:0px;
}
td.colLast a {
padding-bottom:3px;
}
/*
Formatting effect styles
*/
.sourceLineNo {
color:green;
padding:0 30px 0 0;
}
h1.hidden {
visibility:hidden;
overflow:hidden;
font-size:10px;
}
.block {
display:block;
margin:3px 10px 2px 0px;
color:#474747;
}
.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel,
.memberNameLink,
.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel,
.returnLabel,
.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel,
.typeNameLink {
font-weight:bold;
}
.deprecationComment, .emphasizedPhrase, .interfaceName {
font-style:italic;
}
div.block div.block span.deprecationComment, div.block
div.block span.emphasizedPhrase,
div.block div.block span.interfaceName {
font-style:normal;
}
div.contentContainer ul.blockList li.blockList h2{
padding-bottom:0px;
}

More Related Content

Similar to food,banana,5,200.0food,bread,10,120.0household,toaster,5.docx

Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]
Palak Sanghani
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
 

Similar to food,banana,5,200.0food,bread,10,120.0household,toaster,5.docx (20)

CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   CIS 406 Imagine Your Future/newtonhelp.com   
CIS 406 Imagine Your Future/newtonhelp.com   
 
CIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.comCIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.com
 
CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   CIS 406 Life of the Mind/newtonhelp.com   
CIS 406 Life of the Mind/newtonhelp.com   
 
SMI - Introduction to Java
SMI - Introduction to JavaSMI - Introduction to Java
SMI - Introduction to Java
 
Introduction
IntroductionIntroduction
Introduction
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
Strayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade newStrayer cis 406 week 10 assignment 2 u grade new
Strayer cis 406 week 10 assignment 2 u grade new
 
PRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.comPRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.com
 
Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
Owner - Java properties reinvented.
Owner - Java properties reinvented.Owner - Java properties reinvented.
Owner - Java properties reinvented.
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
02 basic java programming and operators
02 basic java programming and operators02 basic java programming and operators
02 basic java programming and operators
 

More from budbarber38650

• World Cultural Perspective Paper Final SubmissionResources.docx
• World Cultural Perspective Paper Final SubmissionResources.docx• World Cultural Perspective Paper Final SubmissionResources.docx
• World Cultural Perspective Paper Final SubmissionResources.docx
budbarber38650
 
•Use the general topic suggestion to form the thesis statement.docx
•Use the general topic suggestion to form the thesis statement.docx•Use the general topic suggestion to form the thesis statement.docx
•Use the general topic suggestion to form the thesis statement.docx
budbarber38650
 
•The topic is culture adaptation ( adoption )16 slides.docx
•The topic is culture adaptation ( adoption )16 slides.docx•The topic is culture adaptation ( adoption )16 slides.docx
•The topic is culture adaptation ( adoption )16 slides.docx
budbarber38650
 
·You have been engaged to prepare the 2015 federal income tax re.docx
·You have been engaged to prepare the 2015 federal income tax re.docx·You have been engaged to prepare the 2015 federal income tax re.docx
·You have been engaged to prepare the 2015 federal income tax re.docx
budbarber38650
 
·Research Activity Sustainable supply chain can be viewed as.docx
·Research Activity Sustainable supply chain can be viewed as.docx·Research Activity Sustainable supply chain can be viewed as.docx
·Research Activity Sustainable supply chain can be viewed as.docx
budbarber38650
 
·Observe a group discussing a topic of interest such as a focus .docx
·Observe a group discussing a topic of interest such as a focus .docx·Observe a group discussing a topic of interest such as a focus .docx
·Observe a group discussing a topic of interest such as a focus .docx
budbarber38650
 
© 2019 Cengage. All Rights Reserved. Linear RegressionC.docx
© 2019 Cengage. All Rights Reserved.  Linear RegressionC.docx© 2019 Cengage. All Rights Reserved.  Linear RegressionC.docx
© 2019 Cengage. All Rights Reserved. Linear RegressionC.docx
budbarber38650
 

More from budbarber38650 (20)

 Assignment 1 Discussion Question Prosocial Behavior and Altrui.docx
 Assignment 1 Discussion Question Prosocial Behavior and Altrui.docx Assignment 1 Discussion Question Prosocial Behavior and Altrui.docx
 Assignment 1 Discussion Question Prosocial Behavior and Altrui.docx
 
● what is name of the new unit and what topics will Professor Moss c.docx
● what is name of the new unit and what topics will Professor Moss c.docx● what is name of the new unit and what topics will Professor Moss c.docx
● what is name of the new unit and what topics will Professor Moss c.docx
 
…Multiple intelligences describe an individual’s strengths or capac.docx
…Multiple intelligences describe an individual’s strengths or capac.docx…Multiple intelligences describe an individual’s strengths or capac.docx
…Multiple intelligences describe an individual’s strengths or capac.docx
 
• World Cultural Perspective Paper Final SubmissionResources.docx
• World Cultural Perspective Paper Final SubmissionResources.docx• World Cultural Perspective Paper Final SubmissionResources.docx
• World Cultural Perspective Paper Final SubmissionResources.docx
 
•       Write a story; explaining and analyzing how a ce.docx
•       Write a story; explaining and analyzing how a ce.docx•       Write a story; explaining and analyzing how a ce.docx
•       Write a story; explaining and analyzing how a ce.docx
 
•Use the general topic suggestion to form the thesis statement.docx
•Use the general topic suggestion to form the thesis statement.docx•Use the general topic suggestion to form the thesis statement.docx
•Use the general topic suggestion to form the thesis statement.docx
 
•The topic is culture adaptation ( adoption )16 slides.docx
•The topic is culture adaptation ( adoption )16 slides.docx•The topic is culture adaptation ( adoption )16 slides.docx
•The topic is culture adaptation ( adoption )16 slides.docx
 
•Choose 1 of the department work flow processes, and put together a .docx
•Choose 1 of the department work flow processes, and put together a .docx•Choose 1 of the department work flow processes, and put together a .docx
•Choose 1 of the department work flow processes, and put together a .docx
 
‘The problem is not that people remember through photographs, but th.docx
‘The problem is not that people remember through photographs, but th.docx‘The problem is not that people remember through photographs, but th.docx
‘The problem is not that people remember through photographs, but th.docx
 
·                                     Choose an articleo.docx
·                                     Choose an articleo.docx·                                     Choose an articleo.docx
·                                     Choose an articleo.docx
 
·You have been engaged to prepare the 2015 federal income tax re.docx
·You have been engaged to prepare the 2015 federal income tax re.docx·You have been engaged to prepare the 2015 federal income tax re.docx
·You have been engaged to prepare the 2015 federal income tax re.docx
 
·Time Value of MoneyQuestion A·Discuss the significance .docx
·Time Value of MoneyQuestion A·Discuss the significance .docx·Time Value of MoneyQuestion A·Discuss the significance .docx
·Time Value of MoneyQuestion A·Discuss the significance .docx
 
·Reviewthe steps of the communication model on in Ch. 2 of Bus.docx
·Reviewthe steps of the communication model on in Ch. 2 of Bus.docx·Reviewthe steps of the communication model on in Ch. 2 of Bus.docx
·Reviewthe steps of the communication model on in Ch. 2 of Bus.docx
 
·Research Activity Sustainable supply chain can be viewed as.docx
·Research Activity Sustainable supply chain can be viewed as.docx·Research Activity Sustainable supply chain can be viewed as.docx
·Research Activity Sustainable supply chain can be viewed as.docx
 
·DISCUSSION 1 – VARIOUS THEORIES – Discuss the following in 150-.docx
·DISCUSSION 1 – VARIOUS THEORIES – Discuss the following in 150-.docx·DISCUSSION 1 – VARIOUS THEORIES – Discuss the following in 150-.docx
·DISCUSSION 1 – VARIOUS THEORIES – Discuss the following in 150-.docx
 
·Module 6 Essay ContentoThe ModuleWeek 6 essay require.docx
·Module 6 Essay ContentoThe ModuleWeek 6 essay require.docx·Module 6 Essay ContentoThe ModuleWeek 6 essay require.docx
·Module 6 Essay ContentoThe ModuleWeek 6 essay require.docx
 
·Observe a group discussing a topic of interest such as a focus .docx
·Observe a group discussing a topic of interest such as a focus .docx·Observe a group discussing a topic of interest such as a focus .docx
·Observe a group discussing a topic of interest such as a focus .docx
 
·Identify any program constraints, such as financial resources, .docx
·Identify any program constraints, such as financial resources, .docx·Identify any program constraints, such as financial resources, .docx
·Identify any program constraints, such as financial resources, .docx
 
·Double-spaced·12-15 pages each chapterThe followi.docx
·Double-spaced·12-15 pages each chapterThe followi.docx·Double-spaced·12-15 pages each chapterThe followi.docx
·Double-spaced·12-15 pages each chapterThe followi.docx
 
© 2019 Cengage. All Rights Reserved. Linear RegressionC.docx
© 2019 Cengage. All Rights Reserved.  Linear RegressionC.docx© 2019 Cengage. All Rights Reserved.  Linear RegressionC.docx
© 2019 Cengage. All Rights Reserved. Linear RegressionC.docx
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

food,banana,5,200.0food,bread,10,120.0household,toaster,5.docx

  • 1. food,banana,5,200.0 food,bread,10,120.0 household,toaster,5 household,washer,200 Inheritance and Interfaces Overview In this homework, you will implement a system that • reads in an inventory file, • prints the inventory to the console, and • 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.
  • 2. 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
  • 3. 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
  • 4. -- 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. • 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 • 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
  • 5. 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 as a zip file. Unzip the file into a directory and then open the file index.html to view the documentation. javadoc/.DS_Store javadoc/allclasses- frame.htmlAll ClassesEdibleFoodItemHouseholdItemInventoryIt emInventoryManagerPerishableShippable javadoc/allclasses- noframe.htmlAll ClassesEdibleFoodItemHouseholdItemInventor yItemInventoryManagerPerishableShippable javadoc/constant-values.html JavaScript is disabled on your browser.
  • 6. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll ClassesConstant Field Values ContentsSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll Classes javadoc/deprecated-list.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll ClassesDeprecated API ContentsSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll Classes javadoc/help-doc.html JavaScript is disabled on your browser.
  • 7. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll ClassesHow This API Document Is Organized This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows. Package Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:Interfaces (italic)ClassesEnumsExceptionsErrorsAnnotation Types Class/Interface Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:Class inheritance diagramDirect SubclassesAll Known SubinterfacesAll Known Implementing ClassesClass/interface declarationClass/interface descriptionNested Class SummaryField SummaryConstructor SummaryMethod SummaryField DetailConstructor DetailMethod Detail Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
  • 8. Annotation Type Each annotation type has its own separate page with the following sections:Annotation Type declarationAnnotation Type descriptionRequired Element SummaryOptional Element SummaryElement Detail Enum Each enum has its own separate page with the following sections:Enum declarationEnum descriptionEnum Constant SummaryEnum Constant Detail Tree (Class Hierarchy) There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package. Deprecated API The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations. Index The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields. Prev/Next These links take you to the next or previous class, interface, package, or related page.
  • 9. Frames/No Frames These links show and hide the HTML frames. All pages are available with or without frames. All Classes The All Classes link shows all classes and interfaces except non-static nested types. Serialized Form Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. Constant Field Values The Constant Field Values page lists the static final fields and their values. This help file applies to API documentation generated using the standard doclet. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll Classes javadoc/Householditems/.DS_Store javadoc/Householditems/Householditems/.DS_Store javadoc/Householditems/Householditems/Householditems/Edibl
  • 10. e.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348 Interface EdibleAll Known Implementing Classes:FoodItempublic interface Edible Interface for items that are edible Method Summary All Methods Instance MethodsAbstract MethodsModifier and TypeMethod and DescriptiondoublegetCalories() Method DetailgetCaloriesdouble getCalories()Returns:calories in the itemSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr
  • 11. | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/FoodI tem.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348 Class FoodItemjava.lang.Objectuh.edu.cis2348.InventoryItemuh.edu.c is2348.FoodItemAll Implemented Interfaces:Edible, Perishablepublic class FoodItem extends InventoryItem implements Edible, Perishable Encapsulates food items Field Summary
  • 12. Fields Modifier and TypeField and Descriptionprivate double_caloriesprivate int_shelfLifeprivate java.util.Date_stockedDateprivate java.util.Date_unusableDate Fields inherited from class uh.edu.cis2348.InventoryItem_nameConstructor Summary Constructors Constructor and DescriptionFoodItem(java.lang.String name, int shelfLife, double calories) Create a new food item Method Summary All Methods Instance MethodsConcrete MethodsModifier and TypeMethod and DescriptiondoublegetCalories() Returns the calories in the food item java.util.DategetExpiredDate() This function returns the expiration date of the product based on its shelf life and the day that it was added to inventory intgetShelfLife() Returns the number of days that a product can remain on the shelves before being thrown out java.lang.StringtoString() Methods inherited from class uh.edu.cis2348.InventoryItemgetNameMethods inherited from class java.lang.Object
  • 13. clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitField Detail_shelfLifeprivate final int _shelfLife_caloriesprivate final double _calories_stockedDateprivate final java.util.Date _stockedDate_unusableDateprivate final java.util.Date _unusableDateConstructor DetailFoodItempublic FoodItem(java.lang.String name, int shelfLife, double calories) Create a new food item Parameters:name - shelfLife - calories - Method DetailgetCaloriespublic double getCalories() Returns the calories in the food item Specified by:getCalories in interface EdibleReturns:getShelfLifepublic int getShelfLife() Description copied from interface: Perishable Returns the number of days that a product can remain on the shelves before being thrown out Specified by:getShelfLife in interface PerishableReturns:the shelf life in daysgetExpiredDatepublic java.util.Date getExpiredDate() Description copied from interface: Perishable
  • 14. This function returns the expiration date of the product based on its shelf life and the day that it was added to inventory Specified by:getExpiredDate in interface PerishableReturns:the expiration date, equal to the stock date plus the shelf lifetoStringpublic java.lang.String toString()Overrides:toString in class InventoryItemSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/Hous eholdItem.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348 Class HouseholdItemjava.lang.Objectuh.edu.cis2348.InventoryItemuh. edu.cis2348.HouseholdItemAll Implemented
  • 15. Interfaces:Shippablepublic class HouseholdItem extends InventoryItem implements Shippable Encapsulates durable items for the house, such as toasters and dryers Field Summary Fields Modifier and TypeField and Descriptionprivate int_weight the weight of the item, used in calculating the shipping cost Fields inherited from class uh.edu.cis2348.InventoryItem_nameConstructor Summary Constructors Constructor and DescriptionHouseholdItem(java.lang.String name, int weight) Constructor Method Summary All Methods Instance MethodsConcrete MethodsModifier and TypeMethod and DescriptiondoublecalculateShippingCost(java.lang.String shipD ateString) Calculates the shipping cost of the item based on its weight and whether it was shipped on a Saturday or Sunday.
  • 16. private booleanisWeekend(java.util.Date shipDate) Determines if the given date is on a weekend. java.lang.StringtoString() Methods inherited from class uh.edu.cis2348.InventoryItemgetNameMethods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitField Detail_weightprivate final int _weight the weight of the item, used in calculating the shipping cost Constructor DetailHouseholdItempublic HouseholdItem(java.lang.String na me, int weight) Constructor Parameters:name - weight - Method DetailcalculateShippingCostpublic double calculateShippingCos t(java.lang.String shipDateString) throws java.text.ParseException Calculates the shipping cost of the item based on its weight and whether it was shipped on a Saturday or Sunday. cost = weight * 20 + fee, where fee = $10.00 if on a Saturday or Sunday, 0 otherwise Specified by:calculateShippingCost in
  • 17. interface ShippableParameters:shipDateString - - the date of shipment, in 'mm-dd-yyyy' formReturns:Throws:java.text.ParseExceptionisWeekendprivate boolean isWeekend(java.util.Date shipDate) Determines if the given date is on a weekend. Parameters:shipDate - Returns:toStringpublic java.lang.String toString()Overrides:toSt ring in class InventoryItemSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/Inven toryItem.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348
  • 18. Class InventoryItemjava.lang.Objectuh.edu.cis2348.InventoryItemDir ect Known Subclasses:FoodItem, HouseholdItempublic abstract class InventoryItem extends java.lang.Object Abstract class that is the base of all inventory items Field Summary Fields Modifier and TypeField and Descriptionprotected java.lang.String_nameConstructor Summary Constructors Constructor and DescriptionInventoryItem(java.lang.String name) Constructs a new inventory item Method Summary All Methods Instance MethodsConcrete MethodsModifier and TypeMethod and Descriptionjava.lang.StringgetName() java.lang.StringtoString() Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitField Detail_nameprotected java.lang.String _nameConstructor DetailInventoryItempublic InventoryItem(java.lang.String name )
  • 19. Constructs a new inventory item Parameters:name - Method DetailgetNamepublic java.lang.String getName()Returns:the name of the objecttoStringpublic java.lang.String toString()Overrides:toStri ng in class java.lang.ObjectSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/Inven toryManager.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348 Class InventoryManagerjava.lang.Objectuh.edu.cis2348.InventoryMan
  • 20. agerpublic class InventoryManager extends java.lang.Object The main class for the inventory management system Field Summary Fields Modifier and TypeField and Description(package private) java.util.ArrayList<InventoryItem>_inventory the list of all items in inventory Constructor Summary Constructors Constructor and DescriptionInventoryManager() Method Summary All Methods Static MethodsInstance MethodsConcrete MethodsModifier and TypeMethod and Descriptionprivate voidloadInventory() Loads inventory from the database private voidloadInventory(java.lang.String fileName) Reads in the inventory file, storing the contents in the _inventory list. static voidmain(java.lang.String[] args) This is the entry point for the application. voidprintInventory() Prints the inventory to the console voidshipAllHouseholdItems(java.lang.String dateString)
  • 21. This function finds all the household inventory items in the inventory. Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitField Detail_inventoryjava.util.ArrayList<InventoryItem> _inventory the list of all items in inventory Constructor DetailInventoryManagerpublic InventoryManager()Method Detailmainpublic static void main(java.lang.String[] args) This is the entry point for the application. It does the following loads the inventory file prints the inventory to the console ships all the household items in inventory, with a ship date of Dec. 24, 2014. Parameters:args - shipAllHouseholdItemspublic void shipAllHouseholdItems(java. lang.String dateString) This function finds all the household inventory items in the inventory. It then calls calculateShippingCost on each of the items and prints the result.
  • 22. Parameters:dateString - - the ship date in the format 'mm-dd- yyyy'loadInventoryprivate void loadInventory(java.lang.String f ileName) throws java.io.FileNotFoundException Reads in the inventory file, storing the contents in the _inventory list. Each line from the given CSV file is parsed as a single inventory element. The input file can contain two inventory types: food and household goods. The format for a line in the CSV file is different for each type. Column 1Column 2Column 3Column 4foodnameshelf lifecalorieshouseholdnameweight(NA)Parameters:fileName - full path to inventory CSV fileThrows:java.io.FileNotFoundExceptionloadInventoryprivate void loadInventory() Loads inventory from the database printInventorypublic void printInventory() Prints the inventory to the console Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/packa ge-frame.htmluh.edu.cis2348
  • 23. InterfacesEdiblePerishableShippable ClassesFoodItemHouseholdItemInventoryItemInventoryManager javadoc/Householditems/Householditems/Householditems/packa ge-summary.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev PackageNext P ackageFramesNo FramesAll ClassesPackage uh.edu.cis2348 Interface Summary InterfaceDescriptionEdible Interface for items that are edible Perishable Methods to be implemented by items that are perishable Shippable Interface for items that can be shipped Class Summary ClassDescriptionFoodItem Encapsulates food items HouseholdItem Encapsulates durable items for the house, such as toasters and dryers InventoryItem Abstract class that is the base of all inventory items
  • 24. InventoryManager The main class for the inventory management system Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev PackageNext P ackageFramesNo FramesAll Classes javadoc/Householditems/Householditems/Householditems/packa ge-tree.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll ClassesHierarchy For Package uh.edu.cis2348 Class Hierarchyjava.lang.Object uh.edu.cis2348.InventoryItemuh.edu.cis2348.FoodItem (implements uh.edu.cis2348.Edible, uh.edu.cis2348.Perishable)uh.edu.cis2348.HouseholdItem (implements uh.edu.cis2348.Shippable)uh.edu.cis2348.InventoryManager Interface Hierarchyuh.edu.cis2348.Edibleuh.edu.cis2348.Perishableuh.ed u.cis2348.ShippableSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll Classes javadoc/Householditems/Householditems/Householditems/Peris
  • 25. hable.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method uh.edu.cis2348 Interface PerishableAll Known Implementing Classes:FoodItempublic interface Perishable Methods to be implemented by items that are perishable Method Summary All Methods Instance MethodsAbstract MethodsModifier and TypeMethod and Descriptionjava.util.DategetExpiredDate() This function returns the expiration date of the product based on its shelf life and the day that it was added to inventory intgetShelfLife()
  • 26. Returns the number of days that a product can remain on the shelves before being thrown out Method DetailgetShelfLifeint getShelfLife() Returns the number of days that a product can remain on the shelves before being thrown out Returns:the shelf life in daysgetExpiredDatejava.util.Date getExpiredDate() This function returns the expiration date of the product based on its shelf life and the day that it was added to inventory Returns:Date objectSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/Householditems/Householditems/Householditems/Shipp able.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method
  • 27. uh.edu.cis2348 Interface ShippableAll Known Implementing Classes:HouseholdItempublic interface Shippable Interface for items that can be shipped Method Summary All Methods Instance MethodsAbstract MethodsModifier and TypeMethod and DescriptiondoublecalculateShippingCost(java.lang.String shipD ateString) Method DetailcalculateShippingCostdouble calculateShippingCost(java.l ang.String shipDateString) throws java.text.ParseExceptionThrows:java.text.ParseExceptionSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrev ClassNext Cla ssFramesNo FramesAll ClassesSummary: Nested | Field | Constr | MethodDetail: Field | Constr | Method javadoc/index.html javadoc/index-files/index-1.html JavaScript is disabled on your browser.
  • 28. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ CcalculateShippingCost(String) - Method in class uh.edu.cis2348.HouseholdItem Calculates the shipping cost of the item based on its weight and whether it was shipped on a Saturday or Sunday. calculateShippingCost(String) - Method in interface uh.edu.cis2348.ShippableCEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-10.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ SshipAllHouseholdItems(String) - Method in class uh.edu.cis2348.InventoryManager This function finds all the household inventory items in the inventory.
  • 29. Shippable - Interface in uh.edu.cis2348 Interface for items that can be shipped CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-11.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ TtoString() - Method in class uh.edu.cis2348.FoodItemtoString() - Method in class uh.edu.cis2348.HouseholdItemtoString() - Method in class uh.edu.cis2348.InventoryItemCEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-12.html JavaScript is disabled on your browser.
  • 30. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ Uuh.edu.cis2348 - package uh.edu.cis2348CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-13.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ __calories - Variable in class uh.edu.cis2348.FoodItem_inventory - Variable in class uh.edu.cis2348.InventoryManager the list of all items in inventory _name - Variable in class uh.edu.cis2348.InventoryItem_shelfLife - Variable in class uh.edu.cis2348.FoodItem_stockedDate - Variable in class uh.edu.cis2348.FoodItem_unusableDate - Variable in class uh.edu.cis2348.FoodItem_weight - Variable in class uh.edu.cis2348.HouseholdItem the weight of the item, used in calculating the shipping cost CEFGHILMPSTU_Skip navigation
  • 31. linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-2.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ EEdible - Interface in uh.edu.cis2348 Interface for items that are edible CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-3.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_
  • 32. FFoodItem - Class in uh.edu.cis2348 Encapsulates food items FoodItem(String, int, double) - Constructor for class uh.edu.cis2348.FoodItem Create a new food item CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-4.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ GgetCalories() - Method in interface uh.edu.cis2348.EdiblegetCalories() - Method in class uh.edu.cis2348.FoodItem Returns the calories in the food item getExpiredDate() - Method in class uh.edu.cis2348.FoodItemgetExpiredDate() - Method in interface uh.edu.cis2348.Perishable This function returns the expiration date of the product based on its shelf life and the day that it was added to inventory getName() - Method in class
  • 33. uh.edu.cis2348.InventoryItemgetShelfLife() - Method in class uh.edu.cis2348.FoodItemgetShelfLife() - Method in interface uh.edu.cis2348.Perishable Returns the number of days that a product can remain on the shelves before being thrown out CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-5.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ HHouseholdItem - Class in uh.edu.cis2348 Encapsulates durable items for the house, such as toasters and dryers HouseholdItem(String, int) - Constructor for class uh.edu.cis2348.HouseholdItem Constructor CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-6.html
  • 34. JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ IInventoryItem - Class in uh.edu.cis2348 Abstract class that is the base of all inventory items InventoryItem(String) - Constructor for class uh.edu.cis2348.InventoryItem Constructs a new inventory item InventoryManager - Class in uh.edu.cis2348 The main class for the inventory management system InventoryManager() - Constructor for class uh.edu.cis2348.InventoryManagerisWeekend(Date) - Method in class uh.edu.cis2348.HouseholdItem Determines if the given date is on a weekend. CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-7.html JavaScript is disabled on your browser.
  • 35. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ LloadInventory(String) - Method in class uh.edu.cis2348.InventoryManager Reads in the inventory file, storing the contents in the _inventory list. loadInventory() - Method in class uh.edu.cis2348.InventoryManager Loads inventory from the database CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-8.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ Mmain(String[]) - Static method in class uh.edu.cis2348.InventoryManager
  • 36. This is the entry point for the application. CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/index-files/index-9.html JavaScript is disabled on your browser. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll ClassesCEFGHILMPSTU_ PPerishable - Interface in uh.edu.cis2348 Methods to be implemented by items that are perishable printInventory() - Method in class uh.edu.cis2348.InventoryManager Prints the inventory to the console CEFGHILMPSTU_Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrev LetterNext LetterFramesNo FramesAll Classes javadoc/overview-tree.html JavaScript is disabled on your browser.
  • 37. Skip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll ClassesHierarchy For All Packages Package Hierarchies: uh.edu.cis2348 Class Hierarchyjava.lang.Object uh.edu.cis2348.InventoryItemuh.edu.cis2348.FoodItem (implements uh.edu.cis2348.Edible, uh.edu.cis2348.Perishable)uh.edu.cis2348.HouseholdItem (implements uh.edu.cis2348.Shippable)uh.edu.cis2348.InventoryManager Interface Hierarchyuh.edu.cis2348.Edibleuh.edu.cis2348.Perishableuh.ed u.cis2348.ShippableSkip navigation linksPackageClassTreeDeprecatedIndexHelpPrevNextFramesNo FramesAll Classes javadoc/package-list uh.edu.cis2348 javadoc/script.js function show(type) { count = 0; for (var key in methods) { var row = document.getElementById(key); if ((methods[key] & type) != 0) { row.style.display = '';
  • 38. row.className = (count++ % 2) ? rowColor : altColor; } else row.style.display = 'none'; } updateTabs(type); } function updateTabs(type) { for (var value in tabs) { var sNode = document.getElementById(tabs[value][0]); var spanNode = sNode.firstChild; if (value == type) { sNode.className = activeTableTab; spanNode.innerHTML = tabs[value][1]; } else { sNode.className = tableTab; spanNode.innerHTML = "<a href="javascript:show("+ value + ");">" + tabs[value][1] + "</a>"; } } } javadoc/stylesheet.css /* Javadoc style sheet */ /* Overall document style */ @import url('resources/fonts/dejavu.css'); body { background-color:#ffffff;
  • 39. color:#353833; font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; font-size:14px; margin:0; } a:link, a:visited { text-decoration:none; color:#4A6782; } a:hover, a:focus { text-decoration:none; color:#bb7a2a; } a:active { text-decoration:none; color:#4A6782; } a[name] { color:#353833; } a[name]:hover { text-decoration:none; color:#353833; } pre { font-family:'DejaVu Sans Mono', monospace; font-size:14px; } h1 { font-size:20px; } h2 { font-size:18px; } h3 { font-size:16px;
  • 40. font-style:italic; } h4 { font-size:13px; } h5 { font-size:12px; } h6 { font-size:11px; } ul { list-style-type:disc; } code, tt { font-family:'DejaVu Sans Mono', monospace; font-size:14px; padding-top:4px; margin-top:8px; line-height:1.4em; } dt code { font-family:'DejaVu Sans Mono', monospace; font-size:14px; padding-top:4px; } table tr td dt code { font-family:'DejaVu Sans Mono', monospace; font-size:14px; vertical-align:top; padding-top:4px; } sup { font-size:8px; } /*
  • 41. Document title and Copyright styles */ .clear { clear:both; height:0px; overflow:hidden; } .aboutLanguage { float:right; padding:0px 21px; font-size:11px; z-index:200; margin-top:-9px; } .legalCopy { margin-left:.5em; } .bar a, .bar a:link, .bar a:visited, .bar a:active { color:#FFFFFF; text-decoration:none; } .bar a:hover, .bar a:focus { color:#bb7a2a; } .tab { background-color:#0066FF; color:#ffffff; padding:8px; width:5em; font-weight:bold; } /* Navigation bar styles */ .bar { background-color:#4D7A97;
  • 42. color:#FFFFFF; padding:.8em .5em .4em .8em; height:auto;/*height:1.8em;*/ font-size:11px; margin:0; } .topNav { background-color:#4D7A97; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; font-size:12px; } .bottomNav { margin-top:10px; background-color:#4D7A97; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; font-size:12px; } .subNav { background-color:#dee3e9; float:left; width:100%; overflow:hidden;
  • 43. font-size:12px; } .subNav div { clear:left; float:left; padding:0 0 5px 6px; text-transform:uppercase; } ul.navList, ul.subNavList { float:left; margin:0 25px 0 0; padding:0; } ul.navList li{ list-style:none; float:left; padding: 5px 6px; text-transform:uppercase; } ul.subNavList li{ list-style:none; float:left; } .topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { color:#FFFFFF; text-decoration:none; text-transform:uppercase; } .topNav a:hover, .bottomNav a:hover { text-decoration:none; color:#bb7a2a; text-transform:uppercase; } .navBarCell1Rev { background-color:#F8981D;
  • 44. color:#253441; margin: auto 5px; } .skipNav { position:absolute; top:auto; left:-9999px; overflow:hidden; } /* Page header and footer styles */ .header, .footer { clear:both; margin:0 20px; padding:5px 0 0 0; } .indexHeader { margin:10px; position:relative; } .indexHeader span{ margin-right:15px; } .indexHeader h1 { font-size:13px; } .title { color:#2c4557; margin:10px 0; } .subTitle { margin:5px 0 0 0; } .header ul { margin:0 0 15px 0;
  • 45. padding:0; } .footer ul { margin:20px 0 5px 0; } .header ul li, .footer ul li { list-style:none; font-size:13px; } /* Heading styles */ div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { background-color:#dee3e9; border:1px solid #d0d9e0; margin:0 0 6px -8px; padding:7px 5px; } ul.blockList ul.blockList ul.blockList li.blockList h3 { background-color:#dee3e9; border:1px solid #d0d9e0; margin:0 0 6px -8px; padding:7px 5px; } ul.blockList ul.blockList li.blockList h3 { padding:0; margin:15px 0; } ul.blockList li.blockList h2 { padding:0px 0 20px 0; } /* Page layout container styles */
  • 46. .contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { clear:both; padding:10px 20px; position:relative; } .indexContainer { margin:10px; position:relative; font-size:12px; } .indexContainer h2 { font-size:13px; padding:0 0 3px 0; } .indexContainer ul { margin:0; padding:0; } .indexContainer ul li { list-style:none; padding-top:2px; } .contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { font-size:12px; font-weight:bold; margin:10px 0 0 0; color:#4E4E4E; } .contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { margin:5px 0 10px 0px; font-size:14px; font-family:'DejaVu Sans Mono',monospace; }
  • 47. .serializedFormContainer dl.nameValue dt { margin-left:1px; font-size:1.1em; display:inline; font-weight:bold; } .serializedFormContainer dl.nameValue dd { margin:0 0 0 1px; font-size:1.1em; display:inline; } /* List styles */ ul.horizontal li { display:inline; font-size:0.9em; } ul.inheritance { margin:0; padding:0; } ul.inheritance li { display:inline; list-style:none; } ul.inheritance li ul.inheritance { margin-left:15px; padding-left:15px; padding-top:1px; } ul.blockList, ul.blockListLast { margin:10px 0 10px 0; padding:0; } ul.blockList li.blockList, ul.blockListLast li.blockList {
  • 48. list-style:none; margin-bottom:15px; line-height:1.4; } ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { padding:0px 20px 5px 10px; border:1px solid #ededed; background-color:#f8f8f8; } ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { padding:0 0 5px 8px; background-color:#ffffff; border:none; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { margin-left:0; padding-left:0; padding-bottom:15px; border:none; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { list-style:none; border-bottom:none; padding-bottom:0; } table tr td dl, table tr td dl dt, table tr td dl dd { margin-top:0; margin-bottom:1px; } /* Table styles */ .overviewSummary, .memberSummary, .typeSummary,
  • 49. .useSummary, .constantsSummary, .deprecatedSummary { width:100%; border-left:1px solid #EEE; border-right:1px solid #EEE; border-bottom:1px solid #EEE; } .overviewSummary, .memberSummary { padding:0px; } .overviewSummary caption, .memberSummary caption, .typeSummary caption, .useSummary caption, .constantsSummary caption, .deprecatedSummary caption { position:relative; text-align:left; background-repeat:no-repeat; color:#253441; font-weight:bold; clear:none; overflow:hidden; padding:0px; padding-top:10px; padding-left:1px; margin:0px; white-space:pre; } .overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, .useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, .overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, .useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, .overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
  • 50. .useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, .overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, .useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { color:#FFFFFF; } .overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, .useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { white-space:nowrap; padding-top:5px; padding-left:12px; padding-right:12px; padding-bottom:7px; display:inline-block; float:left; background-color:#F8981D; border: none; height:16px; } .memberSummary caption span.activeTableTab span { white-space:nowrap; padding-top:5px; padding-left:12px; padding-right:12px; margin-right:3px; display:inline-block; float:left; background-color:#F8981D; height:16px; } .memberSummary caption span.tableTab span { white-space:nowrap;
  • 51. padding-top:5px; padding-left:12px; padding-right:12px; margin-right:3px; display:inline-block; float:left; background-color:#4D7A97; height:16px; } .memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { padding-top:0px; padding-left:0px; padding-right:0px; background-image:none; float:none; display:inline; } .overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, .useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { display:none; width:5px; position:relative; float:left; background-color:#F8981D; } .memberSummary .activeTableTab .tabEnd { display:none; width:5px; margin-right:3px; position:relative; float:left; background-color:#F8981D; }
  • 52. .memberSummary .tableTab .tabEnd { display:none; width:5px; margin-right:3px; position:relative; background-color:#4D7A97; float:left; } .overviewSummary td, .memberSummary td, .typeSummary td, .useSummary td, .constantsSummary td, .deprecatedSummary td { text-align:left; padding:0px 0px 12px 10px; width:100%; } th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ vertical-align:top; padding-right:0px; padding-top:8px; padding-bottom:3px; } th.colFirst, th.colLast, th.colOne, .constantsSummary th { background:#dee3e9; text-align:left; padding:8px 3px 3px 7px; } td.colFirst, th.colFirst { white-space:nowrap; font-size:13px; } td.colLast, th.colLast { font-size:13px;
  • 53. } td.colOne, th.colOne { font-size:13px; } .overviewSummary td.colFirst, .overviewSummary th.colFirst, .overviewSummary td.colOne, .overviewSummary th.colOne, .memberSummary td.colFirst, .memberSummary th.colFirst, .memberSummary td.colOne, .memberSummary th.colOne, .typeSummary td.colFirst{ width:25%; vertical-align:top; } td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { font-weight:bold; } .tableSubHeadingColor { background-color:#EEEEFF; } .altColor { background-color:#FFFFFF; } .rowColor { background-color:#EEEEEF; } /* Content styles */ .description pre { margin-top:0; }
  • 54. .deprecatedContent { margin:0; padding:10px 0; } .docSummary { padding:0; } ul.blockList ul.blockList ul.blockList li.blockList h3 { font-style:normal; } div.block { font-size:14px; font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; } td.colLast div { padding-top:0px; } td.colLast a { padding-bottom:3px; } /* Formatting effect styles */ .sourceLineNo { color:green; padding:0 30px 0 0; } h1.hidden { visibility:hidden; overflow:hidden;
  • 55. font-size:10px; } .block { display:block; margin:3px 10px 2px 0px; color:#474747; } .deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, .overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { font-weight:bold; } .deprecationComment, .emphasizedPhrase, .interfaceName { font-style:italic; } div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, div.block div.block span.interfaceName { font-style:normal; } div.contentContainer ul.blockList li.blockList h2{ padding-bottom:0px; }