Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I know the code, but I don\'t know how to answer all the questions. Please help

ID: 3729305 • Letter: I

Question

I know the code, but I don't know how to answer all the questions. Please help me with that

Topics

This assignment will give you practice with classes, inheritance, arrays, and thinking/designing code with an Object-Oriented approach.

Sample Output

QUESTIONS:

In addition to writing code for this assignment, you should also submit a text file that answers the following questions:

1. What is the advantage of designing a Ticketing System using an OOP approach?

2. We are not currently utilizing the owner field of tickets, but theoretically we might want to in the future. What did you make the initial value of your owner field and why? How might we use this field if we were to expand our Ticket client program?

3. Let's say we want to add the ability to purchase tickets. Describe what you would do to add this functionality to your program. (You don't actually need to code this.)

4. If you were to turn this program into a fully functional Ticketing System, describe at least one other class (not related to a Ticket itself) that you might want to create, including what state and behavior it would have. (You don't actually need to code this either, but you should be specific in your explanation, not general.)

Explanation / Answer

1. There can be many advantages depending on the implementation.

(i) First one is its simplicity in designing.Suppose we have many classes like passenger, ticket etc. Now we have states(variables) and then thier behaviours(functions). All this states and behaviours are encapsulated in one class and those classes are related to each other using some common variables like ticket number is there in ticket class as well as in passenger class(bought the ticket). So all this designing and impletation is very easy in oop approch as compared to functional programming.

(ii) we can use other properties of oop as well like we have different types of passengers like children below certain age or senior citizen or physically handicap . we can use inheritance here to reduce the code.

2. Generally we assign NULL where we eighter don't know the data at that time or data does't exist. Because every NULL is different form each other.

3. We can have a field like availability if that is true that means we can buy that ticket and if its false than that seat is already booked and we can't purchase that one. We can count all the tickets where value is true and if passenger wants less or equal tickets than he can purchase otherwise not.

4. Apart from ticket we must have passengers and for which we are booking tickets(train, cinema hall, bus etc) and employers working. Apart from these we can also have many more classes like catering if we have that facility.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote