#Part 1 Rotate Array
###Objectives
- To demonstrate your understanding of objects and functions
- To demonstrate your understanding of controlling execution
- To demonstrate your understanding of access control
- To demonstrate your understanding of reusing classes
Finish the class RotateList in the RotateList package make it subclasse the built-in List class. (Hint extends ?????) Write a function that rotates a list by k elements. For example [1,2,3,4,5,6] rotated by 2 becomes [3,4,5,6,1,2]. The first 2 elements where rotated to the back of the List. If it was rotated by 3 [1,2,3,4,5,6] rotated becomes [4,5,6,1,2,3]. Try solving this without creating a copy of the list. How many swap or move operations do you need?
UML is required Unit test in place before proceeding with code Make sure you test EVERY public method
- In your unit test class, initialize your custom List with values
- In your unit test class call the method that rotates your array
#Part 2 Humans and Superhumans
- To demonstrate your understanding of objects and functions
- To demonstrate your understanding of controlling execution
- To demonstrate your understanding of access control
- To demonstrate your understanding of reusing classes
Complete the 'Human' class in the Superpowers Package that has fields for: name, age, gender, occupation, and address. Also create methods for retreiving and outputing this data to screen.
Then create a SuperHuman class and UNIT TEST that subclasses the first with fields for good or bad, hero name, super ability. As before, create methods for retrieving field data and printing to screen.
UML is required Unit test in place before proceeding with code Make sure you test EVERY public method
- In your unit test initialize a human and superhuman instances
- Demonstrate calling methods inherited from Human on your SuperHuman instances
#Part 3 Class Manager
- To demonstrate your understanding of objects and functions
- To demonstrate your understanding of controlling execution
- To demonstrate your understanding of access control
- To demonstrate your understanding of reusing classes`4 6879
Finish the InventoryManager Class in the InventoryManager Package, which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value.
Note: Inventory and InventoryManager should not be the same class!!!
UML is required Unit test in place before proceeding with code
- In your main class initialize your manager and populate your inventory
- Demonstrate calling methods on your manager