hw2 - size of the cropped portion(c define the appropriate...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1 University of Southern California Daniel J. Epstein Department of Industrial and Systems Engineering ISE 582: Web Technology for Industrial Engineering Homework 2: Due 18 Sep 2003 Instructor: Elaine Chew Please refer to the description of Patronus Posters from Homework 1. [1] Create a Size class with attributes: x, y. [2] Create a Crop class with attributes: size, x1, y1, x2, y2. [3] Create a Price class with attributes: galleons, sickles, knuts. [4] Create an Item class with attributes: type, price, size, frame, crop, quantity. [5] Create an Order class with attributes: item, shipping. For each class: (a) create static final variables for the fixed quantities. (b) create both a zero-parameter constructor (assume reasonable default values) as well as a constructor with the appropriate number of parameters. For the Crop class, create an additional constructor that would take as parameters the poster size, the top-left-corner coordinates of the cropped figure and the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: size of the cropped portion. (c) define the appropriate get and set methods for each instance variable. For the Item class, create instance methods: (a) “subtotal” that calculates the subtotal for an item. (b) “display” that displays the information on an item. For the Order class, create instance methods: (a) “total” that calculates the total for the item and shipping. (b) “display” that displays the relevant information (HINT: use the “display” method in the Item class.) In a separate Demonstrate class, show off what every method and every constructor in your code. This homework presents one of many ways to organize the information in a one-item order for Patronas Posters. Please suggest another way to organize the information. Use the class diagrams introduced in your lectures to describe your proposal. E.C. 12 Sep 2003...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online