Question
i want write code for this please write the answer in java Create a movie class. The movie class has id, name, tour, price properties.
i want write code for this
please write the answer in java
Create a movie class. The movie class has id, name, tour, price properties. Create a user class. User class has name, age and balance properties. Create a cinema class. Cinema class name and movieList (ArrayList accepting objects of Movie class type) properties. Cinema class has the Add movie method. This method takes an object of type Movie class as a parameter and adds it to the movieList. Cinema class has ticketSat method. It takes two parameters as User and Movie. User who bought a ticket If you are under the age of 18, apply a 15% discount and deduct from the user's balance if the balance is sufficient. If you want to buy tickets If the user is over 65, apply a 25% discount, and if the balance is sufficient, deduct from the user's balance. If your age is between [18,65] If so, deduct the film's own fee from the user's balance, if the balance is sufficient. If the user's balance is insufficient, give a warning to the screen. Create a test class. Test each method written.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started