Week6-CS111-Lab6 - 1 - Monday PDF
Week6-CS111-Lab6 - 1 - Monday PDF
Programming Language 2
Computer Science Department
2023
Lab Objectives:
In this lab, a student will practice
• Declare an Interface .
• Declare a class that implements an interface.
Lab Exercise:
Given the following UML implement all the classes in the same package with all needed instance variables,
NEEDED accessor and mutators methods and constructors; then write a test application to demonstrate
the classes capabilities. Hint Abstract class are written in italic
<<interface>> Store
+ branchNumber : int = 16
+RestockRequired () : boolean
Clothes Other
- item_number: int # productType : String
# price: double -inventorybelow20: boolean
+<<Full constructor>> +<<Full constructor>>
+ DisplyType() :String
+ toString():String
MenSection WomenSection
- requested: Boolean # totalsales: double
+<<Full constructor>> +<<Full constructor>>
+ toString():String + toString():String
DressSection
-Dresstype: String
+<<full constructor>>
+ toString():String
Assignment:
Given the following UML implement all the classes in the same package with all needed instance variables,
NEEDED accessor and mutators methods and constructors; then write a test application to demonstrate
the classes capabilities.
VipMembership prime - - - -
BASIC_MEMBERSHIP Member 3 - 400 True