DEV Community

Muhammad Salem
Muhammad Salem

Posted on

Structured Approach to Designing an Airline Management System

First, I want to emphasize that you should Use these characteristics as a guideline, not a rigid set of rules. Your judgment and experience will play a crucial role in making informed decisions during OOA.

Here's how I can help you identify valid objects during Object-Oriented Analysis (OOA) and refine the selection characteristics we discussed earlier:

Beyond Nouns:

  • While nouns are a good starting point, don't limit yourself strictly to them. Verbs can also indicate potential objects representing actions or processes within the system. Look for concepts with well-defined responsibilities.

Focus on Responsibilities:

  • A key aspect of object identification is identifying the responsibilities (behaviors) of a potential object. These responsibilities become the object's methods. If a noun doesn't have clear and distinct responsibilities, it might be better suited as an attribute of another object.

Refined Selection Characteristics:

  1. Retained Information and Responsibilities: Combine these characteristics. The object should encapsulate data (attributes) that needs to be remembered and operations (methods) that manipulate that data or interact with other objects.

  2. Granularity and Cohesion: Look for a balance between having enough attributes and functionalities to be useful and avoiding becoming a "god object" that does too much. Strive for focused and cohesive objects with clear responsibilities.

  3. Completeness: An object should have a complete set of data and functionalities to fulfill its intended purpose. Avoid situations where critical functionalities reside outside the object, leading to scattered logic.

  4. Independence: Objects should strive to be as independent as possible from other objects. This promotes loose coupling and easier maintenance. However, some collaboration is often necessary.

  5. Reusability: Consider the potential reusability of the object. Can it be used in other parts of the system or even future projects? Designing reusable objects promotes code efficiency.

Additional Tips:

  • Domain Expertise: Leverage your understanding of the problem domain to identify objects that reflect real-world concepts relevant to the system.
  • Scenarios and Use Cases: Analyze user stories, use cases, and system behavior to identify objects that participate in these scenarios and fulfill specific functionalities.
  • Maintainability: Always consider the long-term maintainability of your object model. Strive for a clear and well-organized structure that can be easily understood and modified in the future.

Remember: Object identification is an iterative process. As you gather more information and refine your understanding of the system, you might revisit your initial decisions and adjust your object model accordingly. The goal is to create a model that accurately reflects the real-world domain and facilitates the design of a well-structured and maintainable system.

Structured Approach to Designing an Airline Management System

Table of Contents

  1. Introduction
  2. Identifying Candidate Objects
  3. Applying Selection Characteristics
  4. Refining Objects
  5. Defining Attributes and Operations
  6. Designing Class Diagrams
  7. Handling Complexities and Ensuring Scalability
  8. Conclusion

1. Introduction

Designing a robust, scalable, and maintainable Airline Management System (AMS) involves a structured approach to identifying and refining objects. This example will illustrate how to methodically derive the necessary objects and their interactions based on the provided requirements.

2. Identifying Candidate Objects

Problem Statement

We will focus on the following set of requirements while designing the Airline Management System:

  1. Flight Search: Customers should be able to search for flights for a given date and source/destination airport.
  2. Ticket Reservation: Customers should be able to reserve a ticket for any scheduled flight. Customers can also build a multi-flight itinerary.
  3. Flight Information: Users of the system can check flight schedules, their departure time, available seats, arrival time, and other flight details.
  4. Multi-passenger Reservation: Customers can make reservations for multiple passengers under one itinerary.
  5. Admin Functions: Only the admin of the system can add new aircraft, flights, and flight schedules. Admin can cancel any pre-scheduled flight (all stakeholders will be notified).
  6. Reservation Cancellation: Customers can cancel their reservation and itinerary.
  7. Crew Assignment: The system should be able to handle the assignment of pilots and crew members to flights.
  8. Payments: The system should be able to handle payments for reservations.
  9. Notifications: The system should be able to send notifications to customers whenever a reservation is made/modified or there is an update for their flights.

Candidate Objects

From the problem statement, we identify the following candidate objects (nouns):

  • Customer
  • Flight
  • Date
  • Airport
  • Ticket
  • Itinerary
  • User
  • Seat
  • Admin
  • Aircraft
  • Schedule
  • Pilot
  • CrewMember
  • Reservation
  • Payment
  • Notification

3. Applying Selection Characteristics

A. Retained Information

  • Flight: Information about flights must be retained.
  • Customer: Customer details must be retained for reservations and notifications.
  • Ticket: Details of tickets must be retained.
  • Itinerary: Itineraries must be stored.
  • Admin: Admin credentials and permissions must be retained.
  • Aircraft: Aircraft details must be stored.
  • Schedule: Flight schedules must be stored.
  • Reservation: Reservation details must be retained.
  • Payment: Payment records must be stored.
  • Notification: Notification details must be stored.

B. Needed Services

  • Flight: Search, schedule management, seat availability check.
  • Customer: Search flights, make reservations, cancel reservations.
  • Ticket: Generate ticket, modify ticket.
  • Itinerary: Build, modify, cancel.
  • Admin: Add/modify/cancel flights and schedules.
  • Aircraft: Add, modify details.
  • Schedule: Add/modify schedules.
  • Reservation: Make, modify, cancel reservations.
  • Payment: Process payments, refund.
  • Notification: Send notifications, manage subscriptions.

C. Multiple Attributes

  • Flight: Flight number, departure time, arrival time, source, destination, aircraft, schedule.
  • Customer: Name, contact information, user ID, email.
  • Ticket: Ticket number, flight details, customer details, seat number.
  • Itinerary: List of flights, customer details.
  • Admin: Admin ID, permissions.
  • Aircraft: Model, capacity, manufacturer, tail number.
  • Schedule: Flight, date, time.
  • Reservation: Reservation ID, customer, itinerary, payment status.
  • Payment: Amount, status, method, transaction ID.
  • Notification: Type, recipient, message.

D. Common Attributes

  • Flight: All flights have flight number, departure/arrival times, source/destination, etc.
  • Customer: All customers have name, contact info, etc.
  • Ticket: All tickets have ticket number, flight details, etc.
  • Itinerary: All itineraries have a list of flights, customer details.
  • Admin: All admins have admin ID, permissions.
  • Aircraft: All aircraft have model, capacity, etc.
  • Schedule: All schedules have flight, date, time.
  • Reservation: All reservations have reservation ID, customer, itinerary, etc.
  • Payment: All payments have amount, status, etc.
  • Notification: All notifications have type, recipient, message.

E. Common Operations

  • Flight: Search, check availability.
  • Customer: Search flights, make reservations, cancel reservations.
  • Ticket: Generate, modify.
  • Itinerary: Build, modify, cancel.
  • Admin: Add/modify/cancel flights, schedules.
  • Aircraft: Add, modify.
  • Schedule: Add, modify.
  • Reservation: Make, modify, cancel.
  • Payment: Process, refund.
  • Notification: Send, manage.

F. Essential Requirements

  • Flight: Essential for airline operation.
  • Customer: Essential for making reservations.
  • Ticket: Essential for boarding and flight tracking.
  • Itinerary: Essential for managing multi-flight trips.
  • Admin: Essential for managing the system.
  • Aircraft: Essential for flight operations.
  • Schedule: Essential for flight timings.
  • Reservation: Essential for booking flights.
  • Payment: Essential for processing reservations.
  • Notification: Essential for informing customers.

4. Refining Objects

Based on the selection characteristics, we finalize the following objects:

  • Flight
  • Customer
  • Ticket
  • Itinerary
  • Admin
  • Aircraft
  • Schedule
  • Reservation
  • Payment
  • Notification

5. Defining Attributes and Operations

A. Flight

Attributes:

  • FlightNumber
  • DepartureTime
  • ArrivalTime
  • Source
  • Destination
  • Aircraft
  • Schedule
  • AvailableSeats

Operations:

  • searchFlight(Date, Source, Destination)
  • checkAvailability()
  • getFlightDetails()

B. Customer

Attributes:

  • Name
  • ContactInformation
  • UserID
  • Email

Operations:

  • searchFlights(Date, Source, Destination)
  • makeReservation(Itinerary)
  • cancelReservation(ReservationID)
  • buildItinerary(List)
  • modifyItinerary(ItineraryID, List)

C. Ticket

Attributes:

  • TicketNumber
  • FlightDetails
  • CustomerDetails
  • SeatNumber

Operations:

  • generateTicket(Reservation)
  • modifyTicket(TicketID, FlightDetails)

D. Itinerary

Attributes:

  • ItineraryID
  • List
  • CustomerDetails

Operations:

  • buildItinerary(List)
  • modifyItinerary(ItineraryID, List)
  • cancelItinerary(ItineraryID)

E. Admin

Attributes:

  • AdminID
  • Permissions

Operations:

  • addFlight(Flight)
  • modifyFlight(FlightID, FlightDetails)
  • cancelFlight(FlightID)
  • addAircraft(Aircraft)
  • modifyAircraft(AircraftID, AircraftDetails)
  • addSchedule(Schedule)
  • modifySchedule(ScheduleID, ScheduleDetails)

F. Aircraft

Attributes:

  • Model
  • Capacity
  • Manufacturer
  • TailNumber

Operations:

  • addAircraft(AircraftDetails)
  • modifyAircraft(AircraftID, AircraftDetails)

G. Schedule

Attributes:

  • Flight
  • Date
  • Time

Operations:

  • addSchedule(ScheduleDetails)
  • modifySchedule(ScheduleID, ScheduleDetails)

H. Reservation

Attributes:

  • ReservationID
  • Customer
  • Itinerary
  • PaymentStatus

Operations:

  • makeReservation(Itinerary)
  • modifyReservation(ReservationID, Itinerary)
  • cancelReservation(ReservationID)

I. Payment

Attributes:

  • Amount
  • Status
  • Method
  • TransactionID

Operations:

  • processPayment(ReservationID, Amount)
  • refundPayment(TransactionID)

J. Notification

Attributes:

  • Type
  • Recipient
  • Message

Operations:

  • sendNotification(Recipient, Message)
  • manageSubscriptions(CustomerID, Preferences)

The key is to focus on identifying objects that represent complete and meaningful concepts within the system domain. The number of attributes is a factor, but not the sole deciding criterion. Consider the nature of the attributes, their cohesion, and the overall complexity of the model.

Top comments (0)