-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomeworks
53 lines (24 loc) · 1.6 KB
/
Homeworks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Homeworks:
Generics: take a generic class with an instance variable and a method which will take & return the same generic class type.
which ever type the method takes should also return the same type.
--> Annotations & reflections for the employee table : using reflections read the annotation and use them in the query
--> Enums: work flow status: New --> In progress --> Hold/ Resolved --> Closed , Issue name description, creation date, assignee,
methods : create, in-progress, hold, resume, close
1) Books repo
3) immutable: origin class, rename b,c,d classes
5) singleton Object with real time example and multiple objects with real time example
6) Main class, immutable class, multiple mutable & immutable instance variables, make class A immutable
7) Reflections example homework: read class name and instance variables names , and create a table in DB using reflections
mutable: (head office: addstore(), removestore(), noOfStores();
mutable: store (store items, add remove items)
store managers change every 6 months.
immutable: supervisor: name, gender, qualification, address
immutable: storeLocation: addr1, addr2, city)
1)Maintain the repository of Books
2) Provide an utility to validate the existing books and add them to the repository
3) if the book is available, then add it always to the repository
4) checkin - check out of books should be the possibility
5) At any point of time, utility should give us the snapshot of the repository.
6) abandon the entity should be a possibility
7)book - name, author, price, dept, procured date, status
8) status : available / Checked out / Abandoned