Analyse and dissect simple design and programming problems

Assignment Help Other Subject
Reference no: EM132375342

Object Oriented Design and Programming Assignment - Individual Programming Solution to a Problem

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.

Task - Individual Programming Solution to a Problem.

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

Reference no: EM132375342

Questions Cloud

Globalization is positive or negative : Does it increase standards of living around the world, or suffocate other cultures under an onslaught of Big Macs and Coca Cola?
Summarize the content of the podcast : Summarize the content of the podcast (similar to taking notes in class) using complete sentences. In addition, provide personal commentary on the podcast.
Purpose and use of management accounting systems : Understanding of the purpose and use of management accounting systems, and its usefulness in aiding managers make informed decisions
What are the implications of bittorrent for the music indust : What are the implications of BitTorrent for the music industry? For the motion picture industry?
Analyse and dissect simple design and programming problems : Kent Institute Australia - OODP101 Object Oriented Design and Programming. Analyse and dissect simple design and programming problems
What are the erm strengths and weaknesses of strategy : In the process, the bank gave enormous trading authority to one individual. What are the ERM strengths and weaknesses of this strategy?
Transaction processing information systems : What are some differences between Transaction Processing Information Systems and Management Information Systems?
Labor and entrepreneurial innovation : Based on land, minerals and natural resources, labor and entrepreneurial innovation, which country do you feel has the greatest long-term potential
Describe the theoretical problems of ethics : Describe the theoretical problems of ethics (3), the objectives to solving them.

Reviews

len2375342

9/24/2019 12:05:56 AM

Make sure the assessment is written in simple language please not so advanced one. SUBMISSION: A one or two page design + test data document, your .java and .class files. MARKING GUIDE (RUBRIC): There's a total of 30 marks available. Explanation of concepts covered in week and week 10 with example 3 marks. Creation of Product class with all attributes, constructor and methods 4 marks. Constructor overloading in product class to show polymorphic behavior 1.5 marks. Creation of Fresh Fruit class with all attributes, constructor and methods 4 marks. Method overriding in Fresh fruit class to show polymorphic behavior 1.5 marks. Creation of Packaged class with all attributes, constructor and methods 4 marks. Method overriding in Packaged class to show polymorphic behaviour 1.5 marks. Creation of ten different products in driver class 2 marks. Display all created products 2 marks. Program allow user to buy more than one product 2 marks. Display the total amount due and tax component 2 marks. Proper class diagram 2.5 marks.

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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