CSC113_Tutorial3 - Item -itemId:int -name:String...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems Department of Computer Science CSC 113: Java Programming-II, Spring2011 Tutorial 3: Relationship between Classes Page | 1 Date: Saturday, March 05, 2011 Create the classes along with the functionality given in the following UML Diagram. To understand the problem, please refer to the description given after the diagram. Write a java program that will deal with order processing of different daily items. Each order will contain 5 items. You can use Pepsi, Coca Cola, and Bread etc for items or can choose items of your choice. The java program will consists of two classes given in the above UML diagram. The program will display following Menu to execute different member functions of these classes. Order -SIZE: int=5 -itemArray:int[SIZE] itemCounter:int=0 +main(args:String[]) +Order() +addItem(item:Item):void +displayOrder():void
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Item -itemId:int -name:String -quantity:int +Item(id:int,name:String,qua ntity:int) +setName(name:String):void +getName():String +setitemId(id:int):void +getitemId():int +getQuantity():int +setQuantity(val:int):void +displayItemInfo():void King Saud University College of Computer and Information Systems Department of Computer Science CSC 113: Java Programming-II, Spring2011 Tutorial 3: Relationship between Classes Page | 2 Date: Saturday, March 05, 2011 For Adding Item , Enter 1 To View the Order, Enter 2 To Exit, Enter 0 Enter Your Option:____ Option 1: Entering Option 1 will display following output. Output is given with sample data. Enter Item Id: 101 Enter Item Name: pepsi Enter Quantity: 10 Option 2: Entering Option 3 will display information about all items in the order. Option 0: Entering 0 will terminate the program by displaying “Have a Nice Day”....
View Full Document

This note was uploaded on 08/18/2011 for the course COMPUTER S CSC 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Page1 / 2

CSC113_Tutorial3 - Item -itemId:int -name:String...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online