-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOOD
65 lines (53 loc) · 2 KB
/
OOD
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
54
55
56
57
58
59
60
61
62
63
64
65
Part 1: OOD Exercises
1. Design a Library Management System
• Design a system to manage a library’s operations.
• Include classes like Book, Member, Librarian, and Loan.
• Define relationships:
• A Member can borrow multiple Books.
• A Book can be borrowed by multiple Members but only one at a time.
• Add features like:
• Checking out and returning books.
• Searching for books by title, author, or genre.
2. Design a Ride-Sharing System
• Create a system for a ride-sharing app like Uber or Lyft.
• Classes to include:
• Driver, Rider, Ride, and Car.
• Define relationships:
• A Driver has a Car.
• A Rider can request a Ride.
• A Ride connects a Rider to a Driver.
• Add behaviors:
• Finding the nearest driver.
• Calculating the fare for a trip.
3. Design an Online Shopping System
• Develop a basic shopping cart system.
• Classes to include:
• User, Product, Cart, and Order.
• Define relationships:
• A User has a Cart with multiple Products.
• An Order is created when the Cart is checked out.
• Add features like:
• Adding/removing items from the cart.
• Calculating the total price.
4. Build a Social Media Platform
• Design the structure for a social media platform.
• Include classes like User, Post, Comment, and Like.
• Define behaviors such as:
• Adding a post.
• Commenting on posts.
• Liking a post.
5. Design a Movie Ticket Booking System
• Classes to include:
• User, Movie, Theater, Seat, and Booking.
• Define relationships:
• A Theater has multiple Movies and Seats.
• A User can make a Booking for specific Seats in a Theater.
• Add features like:
• Selecting seats.
• Checking seat availability.
• Making payments.
• Python: Use SQLAlchemy, Django ORM.
• Java: Use Hibernate or JPA.
• C#: Use Entity Framework.
• Ruby: Use Active Record.
• PHP: Use Eloquent (Laravel).