GENERIC COLLECTIONS ASSIGNMENT

 

πŸ”· 1. πŸ“š Library Management System

🧾 Question

Design a system to store books and their categories.

  • Each book belongs to one category
  • Display all books for a given category
  • Find a book by ID

✅ Model Classes

class Category
{
public int CategoryId { get; set; }
public string CategoryName { get; set; }
}

class Book
{
public int BookId { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public Category Category { get; set; }
}

πŸ”· 2. πŸ›’ E-Commerce Order System

🧾 Question

Design a shopping system where:

  • A customer places orders
  • Each order has multiple products
  • Calculate total order amount
  • Find a particular Order by ID

✅ Model Classes

class Product
{
public int ProductId { get; set; }
public string Name { get; set; }
public double Price { get; set; }
}

class OrderItem
{
public Product Product { get; set; }
public int Quantity { get; set; }
}

class Order
{
public int OrderId { get; set; }
public string CustomerName { get; set; }
public List<OrderItem> Items { get; set; }
}

πŸ”· 3. πŸŽ“ Student Course System

🧾 Question

Design a system where:

  • Students enroll in courses
  • One student → one course
  • Display all students in a specific course
  • Find a particular Student by ID

✅ Model Classes

class Course
{
public int CourseId { get; set; }
public string CourseName { get; set; }
}

class Student
{
public int StudentId { get; set; }
public string Name { get; set; }
public Course Course { get; set; }
}

πŸ”· 4. πŸš— Vehicle Service Tracking

🧾 Question

Design a system to track vehicle services:

  • Store vehicle details
  • Track last service date
  • Find vehicles not serviced in last 3 months
  • Find a particular Vehcile by ID

✅ Model Classes

class Vehicle
{
public int VehicleId { get; set; }
public string Model { get; set; }
public string OwnerName { get; set; }
public DateTime LastServiceDate { get; set; }
}

πŸ”· 5. 🏨 Hotel Booking System

🧾 Question

Design a booking system where:

  • Customers book hotels
  • Each hotel belongs to a city
  • Display bookings by city
  • Find a particular Booking by ID

✅ Model Classes

class Hotel
{
public int HotelId { get; set; }
public string HotelName { get; set; }
public string City { get; set; }
}

class Booking
{
public int BookingId { get; set; }
public string CustomerName { get; set; }
public Hotel Hotel { get; set; }
}

Comments

Popular posts from this blog

Interview Tips: Dot NET Framework vs Net CORE

OOP Concept in real-time scenario: Mobile Device Management Software

FREE Webinar: Run Your Own Independent DeepSeek LLM