OODP101 Programming Solution to a Problem Assignment

Assignment Help JAVA Programming
Reference no: EM132410169

OODP101 Object Oriented Design and Programming Assignment - Programming Solution to a Problem, Kent Institute, Australia

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.

Assessment Task: Individual Programming Solution to a Problem

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

- The 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.

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 constructors, mutators 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 related 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 constructors, mutators 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 related to the Packaged items.

4. Create a driver class which will have main method and following functionalities.

Create 5 Fresh Fruits items and 5 packaged items 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.

Verified Expert

This project is a Java console application to implement a purchase system for the supermarket. The program demonstrate the concept of inheritance, polymorphism using inheritance and array list to store the objects of the classes.

Reference no: EM132410169

Questions Cloud

Calculate the concentration of zinc nitrate : In the laboratory, a student adds 12.2 g of zinc nitrate to a 125 mL volumetric flask and adds water to the mark on the neck of the flask.
Find the food caloric content of peanut butter : Find the food caloric content of peanut butter in Cal/g. Assume the density of water 1.0 g/mL. The specific heat of water is 4.184 J/g C
Write net ionic equations for precipitation reactions : Write the net ionic equation for the precipitation reaction that occurs when aqueous solutions of ammonium carbonate and chromium(III) iodide are combined.
What is the minimum price that will allow the dairy division : Assume the Dairy Division is operating at capacity. If the Yogurt Division wants to purchase 20000 gallons of milk from the Dairy Division, what is the minimum.
OODP101 Programming Solution to a Problem Assignment : OODP101 Object Oriented Design and Programming Assignment - Programming Solution to a Problem, Assessment Help and Solution, Kent Institute, Australia
Discuss the direct write off method and the allowance method : What are the similarities and differences between the direct write off method and the allowance method for bad debts? The response paper should be in APA format
What does his planning do for the business in light : You are the manager of a small manufacturing firm and your company just purchased a machine that will help fabricate steel more efficiently.
Prepare a bank reconciliation for arthur company at july 31 : Arthur neglected to record $4,000.00 borrowed from the bank on a ten percent six-month note. The bank statement shows the $4,000.00 as a deposit.
Make an exampel of alpha companys general journal entries : Make an exampel of Alpha Company's general journal entries to record the purchase and payment for inventory purchased from its Japanese vendor.

Reviews

Write a Review

JAVA Programming Questions & Answers

  What is value of returnvalue after given code has executed

What is the value of returnValue after the following code has been executed?x = "150";y = "100";returnValue= x - y; Which of the following uses correct syntax to receive a value stored in totalCost?

  Represent one book in java

Represent one book in java

  Create a class called dateprofile

Create a class called DateProfile that has the following private instance members - Create public static constants

  Create java application to create and maintain contact list

Create a JAVA application to create and maintain a contact list - Create a database to store the contact information.

  Write an application that prompts a user for a month

Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date is not this year, in an earlier month this year, in a later month this year, or this month.

  Client class to test implementation of the vector class

Write a client class to test your implementation of the Vector3D class thatyou implemented. Name the package in which this class is defined (projectname) vector3dapp.

  Program that inputs a degree of difficulty

Write a computer program that inputs a degree of difficulty and seven judges' scores and outputs the overall score for that dive. The program should ensure that all inputs are within the allowable data ranges.

  Use of java api to perform interactive i/o in java

To gain experience designing and writing your own Java Program, To use of Java APIs to perform interactive I/O in Java programming, To declare variables and constants appropriately

  What is the applet security manager

What is the applet security manager, and what does it provide

  When is a javascript constructor called

When is a JavaScript constructor called? What is the difference between a constructor in Java and one in JavaScript?

  What wc produces on a linux system

Write a Java program (completely documented according to the class documentation guidelines, of course) named Prog3.java that counts lines, words, and bytes (characters) of text files.

  Prepare a program to show the number with no rounding

Prepare a program to show this outcome with no rounding - java program

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd