Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public void TAdd() { //Create theater objects and a movie list instance Theater item1 = new Theater(Star Wars, movie, 4, 12.5f, 3); Theater item2 =

public void TAdd() { //Create theater objects and a movie list instance Theater item1 = new Theater("Star Wars", "movie", 4, 12.5f, 3); Theater item2 = new Theater(item1); item2.setQuantity(3); MovieListArrayList instance = new MovieListArrayList();

// TODO test the add method for the case of adding a new item (item1) into list instance // Be sure that 1)size is increased by 1 and // 2) the first item in the list // is the same as in the reference variable, item1

// TODO test the "combine" feature of the add method // for the case of adding an existing entry, the item2 // into the movie list instance created in previous // code block. The item2 has the same entry name as the item1. // Be sure that 1) size is not changed and 2) quantities are // properly changed in the first item in the list.

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 Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions