PRG 218 Week 4 Individual Assignment Coding: Classes and Objects
- "Challenge: Ask for a User's Favorite Movies" in Lesson 4, "Classes and Objects," of the Lynda.com® course Learning C++ with Peggy Fisher
- "Solution: Ask for a User's Favorite Movies" in Lesson 4, "Classes and Objects," of the Lynda.com® course Learning C++ with Peggy Fisher Review the video "Challenge: Ask For a User's Favorite Movies" in Lesson 4, "Classes and Objects," of the Lynda.com® course Learning C++ with Peggy Fisher. Take notes on the program requirements. Create a MyMovie class along with a main program that prompts a user with questions about his or her favorite movies, places the user's answers in an array, and then applies content from the array to the creation of MyMovie objects. Create a single C++ project (favoriteMovies) containing three interrelated files (favoriteMovies.cpp, Movie.cpp, and Movie.h) as follows:
- Create a new project in Visual Studio® named favorite Movies.
- Type in the code for favoriteMovies.cpp. You may begin with the example favoriteMovies.cpp file located in Lynda.com® example, if you like.
- From the Visual Studio® main menu, choose Project > Add Class, then choose Visual C++ and click the Add button.
- In the "Generic C++ Class Wizard" dialog, type MyMovie as the class name. Then, for the .h file and .cpp file fields, type Movie.h and Movie.cpp, respectively. Click the Finish button.
- Type the Movie.h and Movie.cpp code into each of these files.
- From the main menu, choose Debug > Start Without Debugging, and build/debug/run as usual. After you have created your version of the program, view the solution provided in the video "Solution: Ask for a User's Favorite Movies" in Lesson 4, "Classes and Objects," of the Lynda.com® course Learning C++ with Peggy Fisher. Sample source code is also available in the Exercise Files linked in Lynda.com® course. Note: To earn full credit for this assignment, the source code you submit must differ from the sample source code in the following ways:
- It must be structured differently, with different variable names and control flow
- Or, if it is structured in a similar fashion, the following changes must be included:
- The program must accept movies that were released between 1950 and 2017
- The Movie class must be named MyMovie
- The comments header of each file must include your name as the author and "Week 4" as the date
Zip the three source files into a single ZIP file named PRG218_Week4_YourName.zip. Submit your ZIP file using the Assignment Files tab.
Questions & Answers
Have a Question?
Be the first to ask a question about this.