✅ COMP123 - Bonus 2
Hello Hello!
This is your second bonus. Read carefully.
PROBLEM
Create a C# console-based project, a class representing a Plane, and implement the following requirements:
Class: Plane
Properties (auto-implemented):
Manufactory: string
Model: string
Capacity: int
Type: string (can be "cargo", "military" or "passenger")
SerialNumber: string
Constructors:
A default constructor that sets the manufactory and model to "unknown", the capacity to 0, the type to "unassigned", and the serial number to "00000".
A constructor that takes in 5 arguments: manufactory, model, capacity, type, and serial number, and sets the corresponding properties.
Methods:
HasCapacity: a method that takes in an int argument for number of people and returns a boolean. The method should return True if the argument of the method is less than or equal to the capacity of the plane and False if the argument is greater than the capacity of the plane.
Override the ToString method to return a string representation of the Plane in the format:
"Manufactory: [manufactory], Model: [model], Capacity: [capacity], Type: [type], Serial Number: [serial number]"
Test Harness:
Create a List of Plane objects, with 5 planes in the Main() method of your Program class.
Loop through the list and print the ToString() of each plane.
Test the HasCapacity method with different number of people and print the result.
To deliver the code:
Use the previously created account on GitHub.com;
Create a new folder called "Bonus2" on the existing private repository that you shared with me before;
Commit your Bonus 2 code to your GitHub repository inside this folder;
Copy and paste the URL to the GitHub repo in the Bonus folder under eCentennial/Assessments/Assignment/Bonus 2
Due date: Saturday June 17, 2023 @ 11:59pm
Good luck!
Aderson