Assignment 1-2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

E-Wallet System

-studentList: list<Student> The E-Wallet System class contains a


list of parents and students and the
-parentList: list<Parent> functions required to add and remove
students and parents

+addStudent(student: Student): void


+removeStudent(student: Student):
void
+addParent(-parent: Parent): void
+removeParent(parent: Parent): void

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

-accountNumber: int The Wallet class contains an account


-usageLimit: int number and usage limit with getters for
both as well as recharge and viewing
usage details functions since both
+getAccountNumber(): int students and parents should be able to
+getUsageLimit(): int do those functions.
+recharge(ammount: int): boolean
+viewUsageDetails: String

Store Canteen Stall Library

-StoreType: String -canteenNumber: String -stallName: String -BooksIssued: list<Book>


-BooksOverdue: list<Book>
+getStoreType(): String +getCanteenNumber(): String +getStallName(): String -TotalFIneOwed: int

+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

You might also like