Problem1. Create a class named Movie that can be used with your video rental business. The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem1. Create a class named Movie that can be used with your video rental business. The Movie class should track the ID number, movie title and year of release and appropriate getters and setters for these fields. Also create an equals() method that overrides Object's equals() method, where two movies are equal if their ID number is identical. Next, create three additional classes named Action, Comedy, and Drama that are derived from Movie. Finally, create an overridden method named calcLateFees that takes as input the number of days a movie is late and returns the late fee for that movie. The default late fee is $2/day. Here are the fees: action movies: $3/day comedies: $2.50/day dramas: $2/day Test your classes from a main method (create a Driver class with main) Problem1. Create a class named Movie that can be used with your video rental business. The Movie class should track the ID number, movie title and year of release and appropriate getters and setters for these fields. Also create an equals() method that overrides Object's equals() method, where two movies are equal if their ID number is identical. Next, create three additional classes named Action, Comedy, and Drama that are derived from Movie. Finally, create an overridden method named calcLateFees that takes as input the number of days a movie is late and returns the late fee for that movie. The default late fee is $2/day. Here are the fees: action movies: $3/day comedies: $2.50/day dramas: $2/day Test your classes from a main method (create a Driver class with main)
Expert Answer:
Answer rating: 100% (QA)
Here is the implementation of the Movie class along with its derived classes Action Comedy and Drama class Movie private int id private String title p... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
c++. error: array must be initialized with a brace enclosed initializer main.cpp X 10 11 ii 12 13 14 4567 15 16 17 18 19 287288285 20 21 23 24 25 26 27 28 25285922223288 30 31 33 34 36 37 40 41 42 43...
-
Tilton Corporation has the following transactions during August of the current year. Indicate (a) The basic analysis (b) The debit-credit analysis illustrated on pages 111-116. Aug. 1 Issues shares...
-
Spring Break Corporation earned $10 million for the fiscal year ending yesterday. The firm also paid out 20% of its earnings as dividends yesterday and it will continue to pay out 20% of its earnings...
-
Stakeholders views. Broken Hill Proprietary Co. Ltd (BHP). BHP is an Australian-based global mineral resources company. A tailings dam constructed at the Ok Tedi copper and gold mine in Papua New...
-
A force F is applied to the handles of the vise grip. Determine the compressive force developed on the smooth bolt shank A at the jaws. Given: F = 5 lb b = 1 in a = 1.5 in c = 3 in d = 0.75 in e = 1...
-
Explain the organisational profile of Bank of Nova Scotia? Explain the sales and marketing objectives of Bank of Nova Scotia? Explain the situational analysis of Bank of Nova Scotia? Describe the...
-
After a series of large project disasters, what country is requiring people to complete a new academic program in project management before leading a large government project? a. Australia b. U.K. c....
-
Refer to table below as we determine the "true costs" of working with this supplier. Determine what the adjusted unit price should be for supplier A given the 4 cost drivers. Cost Factor Supplier A...
-
An unknown mass is attached to a light inextensible string which has a length of 3 . 2 m . ? The other end of the string is attached to a fixed point. The mass is made to move in a horizontal circle...
-
In this slide from the lecture, we're applying the formula for the position of a ball that's launched with an initial velocity (not zero). The positive direction is pointing downhill (as shown by the...
-
How can data-driven approaches, such as diversity metrics and analytics, inform evidence-based decision-making and drive continuous improvement in diversity, equity, and inclusion (DEI) practices?
-
Frank gave Betty real estate with a basis of $100,000 and marketable securities with a basis of $20,000. In exchange, Betty gave Frank real estate with a basis of $240,000 and worth $300,000. The...
-
16. Analysis of an interference effect in a clear material shows that within the material, light from a helium-laser of wavelength 6.33 X 10-7 m in air has a wavelength of 3.30X 10-7 m. Is the...
-
6. Production lines in a manufacturing plant are set to make steel ball bearings with a diameter of 1 micron. Ten ball bearings were randomly selected from two production lines. The diameters of the...
-
Air pollution generated by a steel mill is an example of a) a positive production externality. b) a negative production externality. c) a public good. d) the free-rider problem. State and local taxes...
-
Ackermanns function is a recursive mathematical algorithm that can be used to test how well a computer performs recursion. Write a method ackermann(m,n), which solves Ackermanns function. Use the...
-
If a file already exists, what happens to it if you try to open it as an output file (using the 'w' mode)?
-
If a file does not exist and a program attempts to open it in append mode, what happens?
-
The following events occurred during the first month of business of Hair Affair Pty Ltd, Kate Browns hairdressing salon: 1. issued shares to shareholders in exchange for \($20\) 000 cash 2. purchased...
-
How does journalising differ from posting?
-
On 5 January, the day of her successful grand opening of Hair Affair Pty Ltd, Kate Brown collected \($2280\) in cash for hair styling services, and paid \($400\) in wages and \($92\) for rent. Kate...
Study smarter with the SolutionInn App