logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

A local movie rental store wishes to automate their inventory tracking system. Currently there are three types of movies/videos (in DVD media) to be tracked

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Description

A local movie rental store wishes to automate their inventory tracking system. Currently there are three types of movies/videos (in DVD media) to be tracked:

  • Comedy(denoted as ‘F’ for funny)
  • Drama(denoted as ‘D’)
  • Classics(denoted as ‘C’)

Borrows and returns of items by customers are also to be tracked. Four types of actions are desired in the system:

  • Borrow(denoted as ‘B’): (stock – 1) for each item borrowed  
  • Return(denoted as ‘R’): (stock + 1) for each item returned
  • Inventory(denoted as ‘I’): outputs the inventory of all the items in the store
  • History(denoted as ‘H’): outputs all the transactions of a customer 

 

You will design and implement a program that will initialize the contents of the inventory from a file (data4movies.txt), the customer list from another file (data4customers.txt), and then process an arbitrary sequence of commands from a third file (data4commands.txt).

Details

File formats and file details are as follows:

 

data4movies.txt:

The information about each movie is listed as follows: 

  • Comedy: F, Stock, Director, Title, Year it released 
  • Drama: D, Stock, Director, Title, Year it released
  • Classics: C, Stock, Director, Title, Major actor Release date

For example,

F, 10, Nora Ephron, You've Got Mail, 1998

D, 10, Steven Spielberg, Schindler's List, 1993

C, 10, George Cukor, Holiday, Katherine Hepburn 9 1938

C, 10, George Cukor, Holiday, Cary Grant 9 1938

Z, 10, Hal Ashby, Harold and Maude, Ruth Gordon 2 1971

D, 10, Phillippe De Broca, King of Hearts, 1967

 

  1. You may assume correct formatting, but codes may be invalid; e.g., in this data, the 'Z' code is an invalid entry so this line has to be discarded and users should be notified about this issue. 
  2. While the stock for each line is 10, do not assume that is the case in your design and implementation.
  3. The movies should be sorted as follows when stored in the system:
    1. Comedy(‘F’) sorted by Title, then Year it released 
    2. Dramas(‘D’) are sorted by Director, then Title 
    3. Classics(‘C’) are sorted by Release date, then Major actor
  4. Each item is uniquely identified by its complete set of sorting attributes.  
  5. The classical movie type has a different format than the other two. 
    1. Major actor is always formatted as two strings, FirstName and LastName, separated by a space.
    2. The Release date contains month and year information, and no comma (but a space) between Major actor and Release date. 
    3. In addition, for classical movies, one movie (e.g., Holiday) may have multiple lines, but since each classical movie is uniquely identified by its sorting attributes (Release date, then Major actor in this case), the two entries are treated as separate movies.

 

data4customers.txt:

The information about each customer is listed as follows: 

  • Customer: CustomerID LastName FirstName 

For example,

1111 Mouse Mickey

1000 Mouse Minnie

 

  1. You may assume that the data is formatted correctly. 
  2. CustomerID is 4-digits and uniquely identifies each customer

data4commands.txt:

The information about each command is listed as follows:

  • Inventory I
  • History H CustomerID
  • Borrow B CustomerID MediaType MovieType (movie sorting attributes)
  • Return R CustomerID MediaType MovieType (movie sorting attributes)

For example,

B 1234 D C 9 1938 Katherine Hepburn

B 1234 D F Pirates of the Caribbean, 2003

R 1234 D C 9 1938 Katherine Hepburn

B 1234 D D Steven Spielberg, Schindler's List,

I

H 1234

X 1234 Z C 9 1938 Katherine Hepburn

B 1234 D Y 2 1971 Ruth Gordon

B 9999 D F Pirates of the Caribbean, 2003

B 1234 D C 2 1975 Blah Blah     

 

  1. You may assume correct formatting, but codes may be invalid. You must handle an invalid command code(e.g., ‘X’ in the above example), invalid movie type (e.g., ‘Y’), invalid customer ID (i.e., not found. For example, 9999), and invalid movie (i.e., not found. For example, classic movie in month 2 of 1975 with a "Blah Blah" title). For bad data, discard the line and notify users.
  2. The MediaType is currently on 'D', but may be expanded in the future.
  3. The Band R commands identify the movie using the two sorting attributes, using comma or space to separate them as in the movie data file.
  • Comedy: B 1234 D F Pirates of the Caribbean, 2003
  • Drama: B 1234 D D Steven Spielberg, Schindler's List,
  • Classics: R 1234 D C 9 1938 Katherine Hepburn

Overall Requirements   

  1. Do not print output for successful ‘B’ or ‘R’ commands, but print error messages for incorrect data and/or incorrect command. 
  2. Output for ‘H’ and ‘I’ commands should be neatly formatted with one line per item/transaction.
  3. ‘I’ should output all Comedymovies, then all Dramas, then all Classics. Each category of movies should be ordered according to the sorting criteria discussed above. The data should include how many movies are borrowed and how many remain.
  4. ‘H’ should show a list of DVD transactions of a customer in chronological order (latest to earliest) and specify whether the movie was borrowed or returned. 
  5. You are required to use at least one hash tablein this assignment. There are actually multiple places where they could be used. You can use STL map, vector and other data structures, but you must have one hash table that you implement yourself. The hash table you implement does not need to be extensive, minimum features to store key-id pairs and retrieve them in O(1) time is fine.
  6. You must use inheritance and have polymorphic functions. If you find you’re using templates a lot, run it by me, as this assignment is designed for you to practice using inheritance and polymorphism. 
  7. This assignment is to be fully object‐oriented so when you store multiple pieces of information, it would be stored in an object. Strings are only to be used in a primitive sense, for example, one name, one title, one of anything. Do NOT build long strings that hold complex information.

 

The structure of your classes and taking advantage of the design patterns is especially important for this assignment. You need to follow the basic design principles, have it extendable, efficient, well-documented, etc.

 

While you do not have to explicitly test all your functions using assert, you should still write tests as you develop your program. You should not output any extraneous information or the output for successful ‘B’ or ‘R’ commands. Test cases can have a single start/end printout to indicate the test has been performed. When your program is compiled and run, the last test must use data4commands.txt, data4movies.txt and data4customers.txt files.

You must have README.md (or README.txt) file that follows the provided template (maximum mark 75% if README is missing)

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

658 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

932 Answers

Hire Me
expert
Husnain SaeedComputer science

989 Answers

Hire Me
expert
Atharva PatilComputer science

763 Answers

Hire Me