Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 1.24 KB

README.md

File metadata and controls

21 lines (17 loc) · 1.24 KB

Project Details

Entities and their responsibilities

  • Passenger: Represent a customer booking flights
  • Flight: Contains flight details (flight number, destination, seats, etc.)
  • BookingSystem: Manages flight schedules, ticket purchases, and check-ins.

Collections Usage

  • Array: Used for storing flight seats
  • ArrayList: Stores available flights or a list of passengers.
  • HashMap: Maps passenger IDs to their tickets.
  • HashSet: Used to track checked-in passengers for a specific flight.

OOP Principles

  • Inhertance: Different types of flights (e.g., DomesticFlight, InternationalFlight) extend a base Flight class.
  • Polymorphism: Overriding methods for flight-specific rules.
  • Encapsulation: Private attributes with public getter/setter methods.
  • Composition: BookingSystem has a collection of Flight and Ticket objects.

Thought documentation for ChatGPT

Used ChatGPT to create an outline of the listed project requirements. Identified entities and their tasks alongside how our flight application can meet the collections usage and OOP principles. Used ChatGPT as a guideline to help us implement OOP concepts such as inheritance. ChatGPT was used to clean up any errors we had in our code.