CISY 103 – Lab02
CISY 105 – Lab08
1. Start with A
ayListDemo6 – rename it to Lab08 and your name.
2. Create 8 InventoryItem objects in an a
ayList and then print out the a
ay using a counting loop. Place a nice heading before you print the a
ay.
3. Then remove 3 items of the a
ay and print. Place a blank line with another nice heading and print out the a
ay again user a counting loop.
4. Then replace one of the items in the a
ay. Place a blank line with another nice heading and print out the a
ay again user a counting loop.
Note: Don’t forget you will also need InventoryItem.java
Ru
ic
name in a comment at the top (2 points)
Class/file name (5 points)
(naming convention starts with upper case, subsequent words upper case)
Variable Declarations (15 points)
(datatypes and naming convention starts with lower case, subsequent words upper case, variables declared at top of method)
Declaration/Allocation of an A
ay using A
ayList (10 points)
Three counting loops for printing elements of the a
ay (30 points)
Adding initial 8 elements to the a
ay (10 points)
Removing 3 elements of the a
ay (10 points)
Replacing one element of the a
ay (10 points)
proper indenting (8 points)
· body of class indented, body of methods indented, body of loop indented
The lab must be submitted to Canvas.
Page 1