+ All Categories
Home > Art & Photos > Introduction to java programming

Introduction to java programming

Date post: 13-Feb-2017
Category:
Upload: iium
View: 172 times
Download: 0 times
Share this document with a friend
9
Introduction to Java Programming Object Oriented Programming Project: Online Food Section 5 Instructor: ALI A.ALWAN ALJUBOORI Participants: Wan Muhammad Nazmi Wan Abdul Halim 1414021 Muhammad Zawawi 1418901 Ahmad Haraz Bin Zaimi 1320003 Muhd Muadz Bin Muhd Azmi 1411959
Transcript
Page 1: Introduction to java programming

Introduction to Java Programming

Object Oriented Programming

Project: Online Food

Section 5

Instructor: ALI A.ALWAN ALJUBOORI

Participants:

Wan Muhammad Nazmi Wan Abdul Halim 1414021

Muhammad Zawawi 1418901

Ahmad Haraz Bin Zaimi 1320003

Muhd Muadz Bin Muhd Azmi 1411959

Page 2: Introduction to java programming

ABSTRACT

This java project is about online food ordering. Provides information about the services available for the customers.

This project basically contains UML diagram and classes and objects. One super class Order, under that has two sub

classes, Food and Drink. Food and Drink were inherited by several sub classes like Lemon and Samosa. In addition, it

includes inheritance, overriding and overloading, arrays and GUI.

All classes specify the necessary attributes, modifiers and methods. The attributes are according to the food and

drink and the modifiers are public, private and protected, set and get methods are included.

The graphical user interface ask the user to enter whether they want food or drink or both, then it shows the total

price on the GUI for the payment. Arrays have been used to show what kinds of foods and drinks are available.

Page 3: Introduction to java programming

UML CLASS DIAGRAM

Order

-Quantity:int

-FoodName:String

-unitPrice:double

-TotalPrice:double

-amount:double

-balance:double

+Order()

+Order(quantity:int, FodName: String, unitPrice:double, TotalPrice:double,

amount:double, balance:double)

+getQuantity(): int

+setQuantity(quantity:int):void

+setFoodName(FoodName:String):void

+getUnitPrice:double

+setUnitPrice(unitPrice:double):void

+getTotalPrice:double

+setTotalPrice(TotalPrice:double):void

+getAmount:double

+setAmount(amount:double):void

+getBalance:double

+setBalance(Balance:double):void

+toString():String

Page 4: Introduction to java programming

Drink

-totalDrink:double

-Status:Boolean

-Type:String

-size:char

+Drink

+Drink(totalDrink:double, Status:

Boolean, Type:String, size:char)

+getTotalDrink()

+setTotalDrink(totalDrink:double)

+getStatus():Boolean

+getType():String

+getSize():char

Food

-totalFood:double

-FoodName:String

-size:char

+Food()

+Food(TotalFood : double, size : char)

+getTotalFood() : double

+getTotalPrice() : double

+setTotalPrice() : double

+getSize() : char

Samosa Calc1

-totalPirce_samosa : double

-quantityS : int

-flavourS : String

+SamosaCalc1()

+SamosaCalc1(quantityS :int,

flavourS : String)

+getQuantity() : int

+setQuantity () : void

+getFlavour() : String

+setFlavour(String Flavour) : void

+getTotalPriceS( String Flavour )

+setSize() : void

DrinkC

-totalDrink:int

-totalPrice:int

-DrinkName:String

-size:String

+DrinkC()

+DrinkC(TotalDrink :int, TotalPirce : int,

DrinkName:String, size:String)

+getTotalDrink() : int

+setTotalDrink() : void

+getTotalPrice() : double

+setTotalPrice() : void

+getSize() : String

+setSize() : void

Page 5: Introduction to java programming

List of defects :

1. Small letter-case cannot be used. For example the user must use upper-case letter in choose drink tab.

2. Cannot retrieve the balance of money if give big money

3. Back Button to return to previous interface cannot be done for any checking.

Lemon Calc1

-oquant : int

-tprice : double

-flavourR : String

+LemonCalc1()

+LemonCalc1(oquant :int, flavourR :

String)

+getQuant() : int

+setQuantity (int oquant) : void

+getTotalPriceR( String Flavour )

Page 6: Introduction to java programming
Page 7: Introduction to java programming
Page 8: Introduction to java programming

Recommended