Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

J MovieADT.java cuen ninu ax (9) wat anie e tures, nex anin whinin * mon an temenapy meter inien wh. wits nimite ande an atrand

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
J MovieADT.java cuen ninu ax (9) wat anie e tures, nex anin whinin * mon an temenapy meter inien wh. wits nimite ande an atrand inters yeti. wil an = = an 8 Download Lab03MovieCollectionsSkeletonizip and import it into Eclipse. As needed you can reference instructions for importing to Eelipse: Eciipse import (1).pdf (Aiag. Note: The skeleton does contain errors, these will be resolved as you implement the various portions of the lab 50 iution. - Create a new class named Movie in the collections package. - Have Movie class extend the MovieADT abstract class The MovieADT class provides all of the methods you will need for the Movie class. What does this mean? That when you extend MovieADT the "Movie" class will get all those methods automatically. - So all you need to do in the Move class is inplement the constructor, which tales a parameter and makes a call to MovieADT. ginnings of the test class are provided here: pockoge collections; public class MovieTest extends student. TestCose private Movie movie; i* 'Sets up \% public void setUp0) movie = new Movie('Spiderman"); movie.setGene(Action') movie settear 2002)i movie.iethating 4 . j If start your test coses below 1 Looking at the MovieADT class, you will see getter and setter methods which have been implemented for you. You will need to write the test cases for these getter and setter methods. You can test getTitle by comparing it to the title sent to the constructor. For the other instance variables test the getter and setter by using them together, for example: public void testGetGenre() I/ Check the Jurrent value of the field assertEquals("Action"; movie.getGenre0): I/ Set a new value and confirm that it updated properiy moviesetGenre('Romance') assertEquals("Romance", movie.setGenrells Conditions te check while testing the (already imalemented equals method: 1. Comparing a movie object to itself fie. the same variablel. 2. Comparing a movie object to null (or a null object) 3. Comparing a movie object to another movie object. Comparing two movie objects with the same title fout difterent variable numes). Comparing two movie objects with a different title (obviously ditferent variables). 4. Comparing a movie object to an object that is not a movie object there are a lot of objects that are not of class movie? Now check to make sure all of your tests pass for the Movie clars then move on to implement the Moviecollection interface iGo back to see which class should implement this interface) J MovieADT.java cuen ninu ax (9) wat anie e tures, nex anin whinin * mon an temenapy meter inien wh. wits nimite ande an atrand inters yeti. wil an = = an 8 Download Lab03MovieCollectionsSkeletonizip and import it into Eclipse. As needed you can reference instructions for importing to Eelipse: Eciipse import (1).pdf (Aiag. Note: The skeleton does contain errors, these will be resolved as you implement the various portions of the lab 50 iution. - Create a new class named Movie in the collections package. - Have Movie class extend the MovieADT abstract class The MovieADT class provides all of the methods you will need for the Movie class. What does this mean? That when you extend MovieADT the "Movie" class will get all those methods automatically. - So all you need to do in the Move class is inplement the constructor, which tales a parameter and makes a call to MovieADT. ginnings of the test class are provided here: pockoge collections; public class MovieTest extends student. TestCose private Movie movie; i* 'Sets up \% public void setUp0) movie = new Movie('Spiderman"); movie.setGene(Action') movie settear 2002)i movie.iethating 4 . j If start your test coses below 1 Looking at the MovieADT class, you will see getter and setter methods which have been implemented for you. You will need to write the test cases for these getter and setter methods. You can test getTitle by comparing it to the title sent to the constructor. For the other instance variables test the getter and setter by using them together, for example: public void testGetGenre() I/ Check the Jurrent value of the field assertEquals("Action"; movie.getGenre0): I/ Set a new value and confirm that it updated properiy moviesetGenre('Romance') assertEquals("Romance", movie.setGenrells Conditions te check while testing the (already imalemented equals method: 1. Comparing a movie object to itself fie. the same variablel. 2. Comparing a movie object to null (or a null object) 3. Comparing a movie object to another movie object. Comparing two movie objects with the same title fout difterent variable numes). Comparing two movie objects with a different title (obviously ditferent variables). 4. Comparing a movie object to an object that is not a movie object there are a lot of objects that are not of class movie? Now check to make sure all of your tests pass for the Movie clars then move on to implement the Moviecollection interface iGo back to see which class should implement this interface)

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions