Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java programming language. Use OO approach and switch so I can compare the two methods. (Both must output the same thing as shown Q1. (20

Java programming language. Use OO approach and switch so I can compare the two methods. (Both must output the same thing as shown image text in transcribed
image text in transcribed
Q1. (20 marks) Polymorphic Movies listing For this exercise, you have a list of movies that you want to list it out in a random order. The purpose of this exercise is to demonstrate how you use the polymorphism technique in displaying the info of selected movie. The selection is done using a random number generator. Each movie has a structure of (string movieName, string actor). This movie class also has two methods that return the movie plot and the key actor (see table below) Your list of movies are arranged in a specific number as show in the following table number name plot actor A big giant eating machine in the ocean 1 Jaws Mr. Quint Independence Aliens attempt to destroy 2 day planet earth Will Smith A super spy does not Matt Damon 3 Bourne Identity remember his purpose The First Order wants to destroy the Resistance to take over the Galaxy Harrisorn Ford Kevin 4 Star Wars 5 Robinhood Rob the rich to pay the poor Costner Your display should look similar to the following depending on you Random # number generator. Since the listing is based on the random number generation, the display would be different but the contents should be very similar. For this assignment, you are allowed to use switch case to select which movie to display based on the random number. You are however, encouraged to try using OO approach in replacing the switch case method (10 points bonus)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions