Assignment 05: Wednesday 05-12-2020 Warning
Assignment 05: Wednesday 05-12-2020 Warning
Assignment 05: Wednesday 05-12-2020 Warning
ASSIGNMENT 05
Marks: 10
CLASS : BS(CS)-2B
COURSE: CSC-210
Read Carefully:
• The deadline for this assignment is before or on Wednesday 05-12-2020.
WARNING: This is an individual assignment; you must solve it by yourself. Any form of
plagiarism will result in receiving zero in the assignment.
WARNING: Late submission will not be accepted. Any assignment submitted after the cutoff
time will receive zero.
• This assignment has 02 questions that you have to perfrom in JAVA and submit the word file
on LMS
1|Page
CS Department, BUKC 2/4 Semester 2 (Fall 2020)
CSC-210: OOP Assignment 05
Lecturer Income
+ Lecturer(name:String, +
id:String, income: Income(incomeType:String,
Income[]) amount:double, tax:
double)
+ getName():String
+ getId(): String + getIncomeType():String
+ + getAmount():double
calculateTotalIncome():doub + getTax():double
le
+
calculateNetIncome():double
+ displayIncomeInfo(): void
TestClass
+ main(args:
String[]):void
Write a Java class Customer that contains the following attributes and methods:
customerName: the name of customer
customerAddress: the address of customer
orderList[]: array of orders placed by the customer. Maximum of 20 orders
considered.
nbOfOrders: the number of orders placed by the customer
Customer(String, String): two argument constructor having name and address as its
arguments
getCustomerName(): returns the customer name
setCustomerName(): change the customer name
addOrder(Order): can add orders into the orderList
printOrders(): print out the customer and order details with total order cost
SOURCE CODE:
CUSTOM CLASS:
package assignment5;
public Customer() {
CS Department, BUKC 5/4 Semester 2 (Fall 2020)
CSC-210: OOP Assignment 05
ORDER CLASS:
package assignment5;
import java.util.ArrayList;
public Order() {
this.orderDate = OD;
}
return r;
}
Product Class :
package assignment5;
public Product(){
APPLICATION CLASS:
package application_class;
import assignment5.Customer;
import assignment5.Order;
import assignment5.Product;