代做CST 8284 Object Oriented Programming I Assignment #2代写Java编程
- 首页 >> C/C++编程CST 8284 Object Oriented Programming I
Assignment #2
Purpose demonstrate use of:
• OO concepts: interfaces and polymorphism
• use of a Java interface classes together with concrete classes
• good class construction including packages, javadoc & comments
Task to implement a class hierarchy of 2 classes which implement the same Java interface using UML diagrams as the specifications
Detailed requirements:
• Using the UML diagram provided:
o Implement the Deliverable interface and the classes:
Pizza, SubsOrder, FoodItem, Ham, Cheese, Onion, Tomatoe,
Pepperoni, Olive, GreenPepper
o Be sure to use the same names for packages, fields and methods as defined in the UML diagram
o Also provide Javadoc comments for all methods and constructors
• You are provided the class DeliverableTest which contains a main() method that exercises the interface and classes listed above
o Complete the main() method by replacing the TODO comment with code which will create the Sample Output given below
▪ Note: You will have to add appropriate import statements as needed.
o You must use the array deliverableItems and polymorphism (where appropriate) to create the Sample Output
Hint:
Use format specifiers with printf() and/or String.format(). The numbers in the top row are there to help you with the alignment of columns.
Coding requirements:
• follow the Java Coding Conventions as your "style. guide"
• name of the class with the main() method must end in "Test"
• use System.out.printf() or String.format() for all output
• the main() method should perform. all I/O
o there is no end-user input, there should only be output
• create an Eclipse project
o be sure to name your project Firstname.Lastname.Assignment2
o example: Fred.Flintsone.Assignment2
• similarly, export your Eclipse project as a .zip following these naming conventions:
o name your file Firstname.Lastname.Assignment2.zip
o example: Fred.Flintsone.Assignment2.zip
Note:
• You will lose marks if you do not:
o follow the instructions under Detailed Requirements
▪ including any algorithms described
o meet the Coding requirements
o produce the same output as the Sample output
o Fail to implement the provided design specification (UML Class diagram)