What were the actual values from your testing?

Assignment Help Software Engineering
Reference no: EM13922600

Assignment #2 - Classes and File I/O in C++

Grading: For each programming assignment, you are graded by explaining and demoing your code to a TA.

You must demo your program BEFORE the next assignment is due, and if you fail to do so, you will automatically lose.

Your job is to convince the TA that your program works correctly, i.e. show your TA how to use/break your program?

Problem Statement:

We will simulate the physical (not online) Netflix rental system.

You will write a program that creates a class to hold Netflix data, which will have Movie objects.

You will ask the user if he/she wants to enter a new movie to the database or find a movie to rent.

• If the user wants to enter a movie, then you will prompt the user for how many movies they want to enter into the database  and the movie information for each: title, stars, number of cast members, cast member names, movie rating, and copies.

• If the user wants to search for a movie, then you will prompt the user for the information they want to use for the search: name, number of stars, specific cast member, or rating.

In addition, you will continually ask the user if they want to enter a new movie to the database or search for movies based on some criteria.

Here are the class member variables for our Netflix system and movie objects.

It is your job to determine the behavior for each class.

class netflix {
public:
...
private:
movie *m; //This is a dynamic array of movies
int num_movies;
};

class movie {
public:
...
private:
string name;
int stars;
int num_cast;
string *cast; //This is a dynamic array of strings
string rating;
int copies;
};

Example Run of Adding Movies:

Do you want to enter a movie to the database or find a movie to rent? (1 - enter, 2 - find, or 0 - exit) 1

How many movies do you want to enter to the database? 1

Enter the name of your movie: Computer Science 162

How many stars? 5

How many cast members? 2

Enter cast member 1: Jennifer Parham-Mocello

Enter cast member 2: Students

Enter the movie rating: PG

How many copies of this movie: 2

Added to the database!

Do you want to enter a movie to the database or find a movie to rent? (1 - enter, 2 - find, or 0 - exit) 0

Example Run of Renting Movies:

Do you want to enter a movie to the database or find a movie to rent? (1 - enter, 2 - find, or 0 - exit) 2

Do you want to find movies based on: 1 - name, 2 - number of stars, 3 - specific cast member, or 4 - rating)? 1

What is the title? Computer Science 162

Found 1 movie:
Number 1

Title: Computer Science 162

Stars: 5

Cast Members: Jennifer Parham-Mocello, Students

Rating: PG

Current Copies to Rent: 1

Which movie do you want to rent? 1

Movie, Computer Science 162, rented!

Do you want to enter a movie to the database or find a movie to

rent? (1 - enter, 2 - find, or 0 - exit) 0

Your file, netflix.dat, should have the following information separated by the pipe

delimiter. For example, here are the categories in the file:

#|Title|Stars|Cast|Members|Rating|Copies|Rented

Example for the above database:

1|Computer Science 162|5|2|Jennifer Parham-Mocello|Students|PG|2|1

Things to consider in this assignment:

Remember, you need to update the number of movies rented, when the user decides to

rent a specific movie. The current number of copies you have to rent is:

copies to rent = total copies - rented

You need to look search through the database to see how many movies match the

search criteria, in order to know how many movie objects to create to hold the found
movies.

You are not allow to read the whole Netflix database into the program to
search!!!

Requirements:

• You are required to have constructors, destructors, copy constructors, and the appropriate use of const for every class.

• You must have accessor and mutator functions for each member in the class.

• Appropriate behavior for each object to correctly add and rent movies from the data file.

• You must have a Makefile, .h and .cpp for each class, and a driver file with the main function.

• Your program must not have a memory leak!!!

• Make sure you try to keep your functions at a 15 lines max.

Extra Credit:

You must have proper error checking and handling for the input, e.g. choice that isn't valid, try to check out a movie with zero copies, etc. Program Style/Comments

In your implementation, make sure that you include a program header in your program, in addition to proper indentation/spacing and other comments! Below is an example header to include. Make sure you review the style guidelines for

this class, and begin trying to follow them, i.e. don't align everything on the left or put everything on one line!
https://classes.engr.oregonstate.edu/eecs/spring2015/cs162-001/162_style_guideline.pdf

/******************************************************
** Program: rental.cpp
** Author: Your Name
** Date: 04/26/2015
** Description:
** Input:
** Output:

******************************************************/
 Design for Assignment #2 changes/Testing
•  How did your design for searching for data in Assignment #2 change during implementation?

•  What were the actual values from your testing? Did these match your expected values? What did you do to make sure you get the expected values?

Please see the template for this document: Polya_template.pdf You need to have a table with these headings: Input Values

Expected Output Did Actual Meet Expected?

3 Error message for

choice 3 because that

isn't an option.

Reprompt for choice again.

Yes

Electronically submit your C++ program (.h, .cpp, and Makefile files, not your

executable!!!) and design/testing document, as a pdf, by the assignment due date, using

TEACH.

**NOTE: The easiest way to upload your program from ENGR to TEACH is to map a

network drive to your home directory on ENGR. Mac or Windows, See:

https://engineering.oregonstate.edu/computing/fileaccess/

Reference no: EM13922600

Questions Cloud

How the article supports the management of change : discussion of how the article supports the Management of Change requirements in OSHA's PSM Standard, and summary of the article's conclusions and your own opinions
Determining the unique types of pizza : How many unique types of pizza can you create when allowed to choose two of seven types of meats, two of eight types of vegetables, one of two types of sauces, and one of three types of crusts?
Isabel invents a new type of exercise shoe : The power of the government to regulate what use real property may be used for is known as, Which of the following is a partnership?
Nursing profession dating back to the primitive days : Nursing theory has been the cornerstone of the nursing profession dating back to the primitive days of Florence Nightingale. When examining the method of nursing theory formation, it is important to evaluate the core concepts of the theory.
What were the actual values from your testing? : What were the actual values from your testing? Did these match your expected values? What did you do to make sure you get the expected values?
Nursing dates far back into ancient times : Nursing dates far back into ancient times, where woman were seen as the caregivers. However, the science of the profession was initiated by a famous nurse over 100 years ago in the late 1800's, under the leadership of Florence Nightingale
Construct a stem-and-leaf display for the data : (a) List all the values in a table and then construct a stem-and-leaf display for the data. (b) Construct a relative frequency histogram for these data with equal class intervals, the first class being "$0 to less than $5"
Reports on the us chemical safety board website : Search through the investigation reports on the U.S. Chemical Safety Board website (www.csb.gov) and select one that you find interesting
Longer life expectancy for citizens : America has a longer life expectancy for its citizens currently than it has had for several decades. However, when an unexpected illness of an elderly family member happens he or she may find him or herself in a position where assistive care is ne..

Reviews

Write a Review

Software Engineering Questions & Answers

  Continuing to build rx companys marketing plan this

continuing to build rx companys marketing plan this assignment focuses on branding pricing and distribution of your

  Review the practice area for requirements management in

review the practice area for requirements management in cmmi or software requirements analysis in iso 12207 if you have

  Write a function playnovice

Write a function userPlay(marbles) that asks the user for the number of marbles that he or she would like to take and returns that number. The function should keep asking the user for the number of marbles if he or she takes more than half of the ..

  How do you find and install good quality applications

how do you find and install good quality applications software? consider your own preferred approach while discussing

  Explain the function of input controls

Explain the advantages and disadvantages of restricting user interfaces. (User interfaces can often be restricted, limiting the user's ability to navigate to other areas of the system, or out of the system.)

  Identify resource requirements

The purpose of the BIA is to identify and prioritize system components by correlating them to the business process(es) the system supports, and by using this information to characterize the impact on the process(es) if the system were unavailable.

  Explain why you selected the architecture of this case study

Read the case study titled "A Patient Information System for Mental Health Care", located in Chapter 1 of your textbook (attached). Develop an overall architecture for the system described in the assigned reading. Explain why you selected the arch..

  As part of your job you should complete a 10-to-15 page

tonys chips has recently been sold to a new independent company. the new company has hired you to manage a project that

  Design user-s requirements specification for school

Design a user's requirements specification for the EasyDrive School of Motoring database system. Use a single major user view for the application (Director View)

  Explains the components of a formal sdlc process

Explains the components of a formal SDLC process. Include a discussion of the basic elements of the SDLC

  Create graph which shows congestion window size

Design another scenario as duplicate of Drop_Fast scenario. Write the new scenario Drop_Fast_Buffer. In new scenario, edit attributes of Client_East node and assign 65535 to its Receiver Buffer.

  How artificial intelligence traits incorporated into system

Explain how an expert system is created from utilising the knowledge base and including AI traits.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd