Peruttu

OBJECT-ORIENTED DESIGN WITH INHERITANCE AND POLYMORPHISM

TASK 1

· ANALYZE THE GIVEN SCENARIO AND IDENTIFY THE REQUIRED CLASSES AND

THEIR RELATIONSHIPS.

· DEFINE THE REQUIRED CLASSES.

· WRITE TEST DRIVER(S) TO TEST THE METHODS IN THE USER-DEFINED CLASSES.

TASK 2

· ENHANCE THE APPLICATION PROGRAM FROM ASSIGNMENT 1 TO ENABLE THE

ARRAY TO STORE OBJECTS OF VARYING TYPES.

The ABC Bookshop has requested that you enhance the

application to enable them to keep track of items of various

categories which are being sold in their shop.

The information to be stored for the various items are as

follows:

· Books – to represent all sorts of reading materials (e.g.

books, magazines, etc.) available for sale to the public.

o Title

o Author (e.g. Warren Buffet, Y. Daniel Liang, etc.)

o ISBN/ISSN Number (e.g. 978-0-13-876523-1, etc.)

o Publisher (e.g. Pearson International Education, etc.)

o Keyword (e.g. Java, C++, Object-Oriented, etc.)

o Selling price

o Quantity on hand

· Stationery – to represent stationeries available for school

and office supplies. (e.g. calculators, notepads, folders

and etc.)

o Item code

o Brand (e.g. Casio, Alba, etc.)

o Title (e.g. Scientific Calculator, 3” Arch File, etc.)

o Selling price

o Quantity on hand

· Multimedia – to represent items such as Audio CDs, or

DVDs.

o Item code

o Title

o Artist

o Release Date

o Award (e.g. Grammy Awards, etc)

o Selling price

o Quantity on hand

· Promotion – to represent items bundled as a promotion

package.

o Promotion code

o Name

o Items in promotion package

o Promotion Period*

o Selling price

o Quantity on hand

Note: Each item must be categorized as a book, stationery,

multimedia or promotion.

Task 1

(a) Identify the classes and determine the relationships

among the classes required for the above scenario. You

must include the following requirements in your answer:

· Introduce a Name class which comprises two fields

firstName and lastName (to represent the full

name of the Author and Artist).

· *Include a PromotionPeriod class to represent

promotion period objects containing the information

on the promotion start date and end date.

(b) Define the classes that you identified in (a). Each class

should have its own constructor(s), set and get

methods, as well as a customized toString() method

which displays all the data member values in a single

line.

(c) Write test drivers to test the various operations of all your

defined classes.

Task 2

Modify/enhance your application program from Assignment 1

such that the array of 100 components of type Item can be

used to store and process any of Item’s subclasses defined

in Task 1.

Note: The files i uploaded include the classes required with ONE error, i dont know how to pass data from super class to subclass, take a look and help me on that.

This is a very simple java assignment, no connection to database absolutely to the basics. Dont need to use import [url removed, login to view] or any GUI for this. Use the basic output method using [url removed, login to view] is sufficient for this assignment. I have only 3 days to hand in this assignment. I already created all the classes required which are Item2, Book, Multimedia, Promotion, Stationary. Item2 is the superclass and all the other class has to inherit from the superclass. Email me if interested

Taidot: Java

Näytä lisää: java object oriented calculator, write magazines, types sorts, type name design, test scenario, swing design, super shop design, store design objects, stationery design set, stationary shop design, single system design, set application, scientific design, process package design, price package design, package used design, package design award, office relationships, office basics, multimedia artist, method design, look book design, look write, need artist book, get brand design

About the Employer:
( 0 reviews ) Kuala Lumpur, Malaysia

Projektin tunnus: #486471

3 freelanceria on tarjonnut keskimäärin 153 $ tähän työhön

johir123

Ready for work.

30 $ USD 1 päivässä
(1 arvostelu)
1.0
chongliu

start now to solve the problem

180 $ USD 0 päivässä
(0 arvostelua)
0.0
hiode

Please respond ASAP so as I can start working on this job.

250 $ USD 3 päivässä
(0 arvostelua)
0.0