ASSESSMENT BRIEF COURSE: Bachelor of IT Unit: Object Oriented Design and Programming Unit Code: OODP101 Type of Assessment: Assessment Task 4 - Individual Programming Solution to a Problem...

1 answer below »
Programming


ASSESSMENT BRIEF COURSE: Bachelor of IT Unit: Object Oriented Design and Programming Unit Code: OODP101 Type of Assessment: Assessment Task 4 - Individual Programming Solution to a Problem Length/Duration: N/A Unit Learning Outcomes addressed: Upon successful completion of this unit students should be able to: a. Analyse and dissect simple design and programming problems b. Demonstrate basic knowledge of object oriented programming concepts and syntax c. Implement a well-designed modularised solution to small programming problems d. Develop and/or implement testing schedules Submission Date: Week 11 Assessment Task: Individual Programming Solution to a Problem Total Mark: 30 Weighting: 30% of the unit total marks Students are advised that any submissions past the due date without an approved extension or without approved extenuating circumstances incurs a 5% penalty per calendar day, calculated from the total mark E.g. a task marked out of 40 will incur a 2 mark penalty per calendar day. More information, please refer to (Documents > Student Policies and Forms > POLICY – Assessment Policy & Procedures – Login Required) https://kent.rtomanager.com.au/Staff/StaffControls/StaffPages/Staff_DocView.aspx ASSESSMENT DESCRIPTION: Objectives After completing this assessment, you should have developed skills to demonstrate that you are able to:  Write classes that are subclasses of other classes  Write code that overrides behaviour of inherited methods.  Write code that exploits the benefits of polymorphism  Observe/apply principles of good object-oriented design 1. Individual understanding of Object Oriented Programming principles Write about 500 words to explain what you have learnt in week 9 and week 10. Use appropriate examples to illustrate your understanding. 2. Program 2.1 Background The classes you write will be to represent a variety of product types available at a supermarket. They will all have a common method to produce a line of output suitable to be included in a docket. However, depending on what type of product it is, this output will contain different sort of information. For all products, the output line should include:  The name of the item  he ID of product  The price of the item  The amount of the price which is a tax-component (explained below)  Depending on the type of product, the following additional information should be output:  If it is a Fresh Fruit item, the weight of the item (e.g. the Apple is 100 grams, the watermelon is 1200 grams).  If it is a Packaged item, the quantity of units in the package (e.g. 4 eggs in the package, 20 chocolate bars in the bag), and a use-by date. The tax-component is calculated from the price of the item, and the following rates are used:  For Fresh Fruit items, 0%  For Packaged items, 10% of the price Kent Institute Australia Pty. Ltd. Assessment Brief – FORM ABN 49 003 577 302 CRICOS Code: 00161E RTO Code: 90458 Version 1: 22nd December, 2016 TEQSA Provider Number: PRV12051 2.2 Tasks 1. Create a class named Product to be the superclass of all products. It should have suitable constructors to aid with polymorphic behaviour, and contain suitable attributes to store the information that is common to all product types (but whose values vary for each instance of that product type), and appropriate accessors. For all products, the toString method should return only the name and ID of the product. 2. Create a class to represent Fresh Fruit items. It should be a subclass of the class made in task 1. Ensure that it contains appropriate attributes to store additional information specific to fresh fruit. Ensure that there is a suitable constructor to set all values appropriately, and that there are appropriate accessors to obtain all information relevant to fresh fruit. Override toString() method so that it return all relevant information to the fresh fruit. 3. Create a class to represent Packaged items. It should be a subclass of the class made in task 1. Ensure that it contains appropriate attributes to store additional information specific to packaged items. Ensure that there is a suitable constructor to set all values appropriately, and that there are appropriate accessors to obtain all information relevant to packaged items. Override toString() method so that it return all relevant information to the Packaged items. 4. Create a driver class which will have main method and following functionalities.  Create ten different products and display them on console.  Ask user to select the products that they want to buy by selecting the IDs.  User can buy multiple products in one purchase.  Use proper get methods to find total amount and total tax component.  Display the docket which will have information about total amount due and total tax value in purchase. 5. Create a class diagram for above mentioned classes. Show all attributes, methods and proper relationships between classes. ASSESSMENT SUBMISSION: Week 11 Kent Institute Australia Pty. Ltd. Assessment Brief – FORM ABN 49 003 577 302 CRICOS Code: 00161E RTO Code: 90458 Version 1: 22nd December, 2016 TEQSA Provider Number: PRV12051 MARKING GUIDE (RUBRIC): There’s a total of 30 marks available Marking criteria Maximum Marks Creation of Product class with all attributes, constructor and methods. 5 Constructor overloading in product class to show polymorphic behaviour 1.5 Creation of Fresh Fruit class with all attributes, constructor and methods. 5 Method overriding in Fresh fruit class to show polymorphic behaviour 1.5 Creation of Packaged class with all attributes, constructor and methods 5 Method overriding in Packaged class to show polymorphic behaviour 1.5 Creation of ten different products in driver class 2 Display all created products 2 Program allow user to buy more than one product 2 Display the total amount due and tax component 2 Proper class diagram 2.5 Total 30 SUBMISSION: A one or two page design + test data document, your .java and .class files GENERAL NOTES FOR ASSIGNMENTS Assignments should usually incorporate a formal
Answered Same DaySep 27, 2021OODP101

Answer To: ASSESSMENT BRIEF COURSE: Bachelor of IT Unit: Object Oriented Design and Programming Unit Code:...

Mohd answered on Oct 01 2021
141 Votes
solution/Class Diagram.PNG
solution/Supermarket Console Application/.classpath

    
    
    
solution/Supermarket Console Application/.project

     Supermarket Console Application
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
    
        
            
        
    
    
         org.eclipse.jdt.core.javanature
    
solution/Supermarket Console Application/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
solution/Supermarket Console Application/bin/supermarket/Driver.class
package supermarket;
public synchronized class Driver {
public void Driver();
public static void main(String[]);
}
solution/Supermarket Console Application/bin/supermarket/FreshFruit.class
package supermarket;
public synchronized class FreshFruit extends Product {
private double discount;
public void FreshFruit(String, String, double, double, int);
public double getDiscount();
public String toString();
}
solution/Supermarket Console Application/bin/supermarket/Packaged.class
package supermarket;
public synchronized class Packaged extends Product {
private double discount;
public void Packaged(String, String, double, double, int);
public double getDiscount();
public String toString();
}
solution/Supermarket Console Application/bin/supermarket/Product.class
package supermarket;
public synchronized class Product {
private String productId;
private String itemName;
private double price;
private int quantity;
public void Product(String, String, double, int);
public double getPrice();
public void setPrice(double);
public int getQuantity();
public void setQuantity(int);
public String getProductId();
public String getItemName();
public String toString();
}
solution/Supermarket Console Application/src/supermarket/Driver.java
solution/Supermarket Console...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here