Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB 7-Movie List Program Goali Your assignment is to write a C++program to implement the ADT List by creating a list of movies. This assignment

image text in transcribed
LAB 7-Movie List Program Goali Your assignment is to write a C++program to implement the ADT List by creating a list of movies. This assignment will help you practice: multiple file programming, classes, pablic and private methods, dynamie memory, constructors and destructors, arrays and files Implementation the required classes This lab assignment gives you the opportunity to practice creating classes and using dynamic memory in one of There are two classes to implement: Movie and MovieList. As you can see in the description table, MovieList has_movies, a list of Movie objects modeled using an array of Movie (pointers to Movie). Each Movie object will be dynamically created when it is added to the list if it is possible to add them (the list might be full, or the insert position invalid). You will create the following files: contains the Movie class declaration contains the Movie class method definitions contains the Movie class declaration contains the Movie class method definitions movie, h - movie.cpp - movielist.h - movielist.cpp You are not turning in a main( for this program. You will compile, run, and test your program using the unit test. You are strongly encouraged to start by writing Movie and ensuring all relevant unit tests pass before moving on to MovieList. Only the unit test will be used for grading The following table explains each of the methods that you will need to implement. Class Access Member Description Private Private genre Private Title of the movie, there can be spaces in the title Genre of the movie, there can be spaces in the Year the movie was first released in theaters Constructor that takes in the title, the genre, year Public Movie const strings title, and the year for a movic. Notice that there is const string& genre, N0 default constructor ize t year Public Movie(const Movie&) PublicWrite( Copy constructor. Writes the movie to the output stream in the parameter. Prints a formatted output if the ostream&, bool false): void boo1 parameter is true (30 columns for title, Movie 15 for genre, 6 for year), prints unformatted output if the bool is false (one field per line). Reads a movie from an input stream, the fields Public Read(istrean&): void end line. Public Gettitle): string Public GetGenre): string Public GetYear(): size t Public Equals (const Movie&): bool Compares two movies for equality, returns true Returns the title of the movie. Returns the genre of the movie. Returns the year of the movie. if title, genre, and year match exactly, false otherwise

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

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions