Professional Documents
Culture Documents
Assignment 1-2
Assignment 1-2
Assignment 1-2
0..* 0..*
Student Parent
The Student class contains a The Parent class contains a
Name, roll number, and wallet name and wallet object with getters for
object with getters for all the -name: String both. There are ffunctions for llinking
-name: String
variable and functions for creating a -rollNumber: String the wallet to the parent and setting
-wallet: Wallet
wallet and using money since those -wallet: Wallet usage limits since those are things
are things only the student should only the parent should be able to do
be able to do and not the parent. and not the student.
+getName(): String
+getName(): String
+getRollNumber(): String
+getWallet(): Wallet
+getWallet(): Wallet
+linkWallet(accountNumber: String): void
+createWallet(bankAccountNumber): Wallet
+setUsageLimit(limit: int): void
+use(ammount: int): boolean
Wallet
+getBooksIssued(): list<Book>
+getBooksOverdue(): list<Book>
+getTotalFIneOwed: int
Amenities Festival
The Store, Canteen, and stall
+borrowBook(Book, string Date): void
classes inheret a basic store structure +returnBook(Book, String Date): void
-itemPriceList: Hashmap<String; int> -festName: String
from the amenties class with some
store speific variables in their own -itemsBought: list<String> -stallList: list<stall>
classes. The stall class is also -total: int -total: int
assccoiated with the Festival class
which can be used to manage the
amount paid by a student in a festival. +getItemsPriceList(): Hashmap<String; +getFestName(): String
int> +getStallList(): list<stall>
+getItemsBought(): list<String>
+getTotal(): int +addFestivalExpense(int Book
ammount): void
+addItemBought(String Item): void -name: String
+calculateTotal(): int -id: String
-borrowDate: String
The Library class manages
books borrowed and returrned by
a student and incurrs fines on the +getName(): String
student when books are overdue It +getId(): String
does this by keeping a list of book
objects wiith the borrow date property +getBorrowDate(): String
and checks when its been a set
number of days since the book was +setBorrowDate(String Date): void
last borrowed