Create codes using C++ These are the questions: Movie Rental Application Requirements It should have the following field
Posted: Fri Jul 08, 2022 7:27 am
Create codes using C++
These are the questions:
Movie Rental Application
Requirements
It should have the followingfields
Constructor:
public Movie (String title, intrelease_year, int duration)
set date_borrowed to null anddays_borrowed to 0
public static void main (Stringargs[]) {
ArrayList<Movie> yourVariable = instantiate
Movie.rentFee = set the rent price per day (e.g. 5 … this means$5/day)
/* read the filenetflix_titles.csv [3 marks]
Store each row in an object of type Movie
Then store the object inside an ArrayList<Movie>
*/
/* create a menu [1 mark]
*/
/* Rent menu [4 marks]
- display the available movies (hint: check if date_borrowedis null)
- let the user pick the movie(s) he/she wants to rent
(note: the user can borrow multiple movies. Your menu should beintuitive)
- When the user selects a movie torent, get the current date. This will be the value assigned to date_borrowed.
- ask the user the number of days hewould like to borrow the movie
- provide an exit option to go backto the previous menu
*/
/*
This part will beexecuted at the end of the program when it is about toterminate.
write all the movies theuser borrowed to a file (e.g. rent.csv) [4 marks]
title, date_borrowed (mmm dd, yyyy),number of days, due date, rent fee, amount
Notes:
amount = number of days * rentfee
due date = borrowed date + number ofdays (format: MMM dd, yyyy)
ex. Jun 5, 2022 + 3 … therefore, due date will be Jun 8, 2022
1 record per row.
*/
These are the questions:
Movie Rental Application
Requirements
It should have the followingfields
Constructor:
public Movie (String title, intrelease_year, int duration)
set date_borrowed to null anddays_borrowed to 0
public static void main (Stringargs[]) {
ArrayList<Movie> yourVariable = instantiate
Movie.rentFee = set the rent price per day (e.g. 5 … this means$5/day)
/* read the filenetflix_titles.csv [3 marks]
Store each row in an object of type Movie
Then store the object inside an ArrayList<Movie>
*/
/* create a menu [1 mark]
*/
/* Rent menu [4 marks]
- display the available movies (hint: check if date_borrowedis null)
- let the user pick the movie(s) he/she wants to rent
(note: the user can borrow multiple movies. Your menu should beintuitive)
- When the user selects a movie torent, get the current date. This will be the value assigned to date_borrowed.
- ask the user the number of days hewould like to borrow the movie
- provide an exit option to go backto the previous menu
*/
/*
This part will beexecuted at the end of the program when it is about toterminate.
write all the movies theuser borrowed to a file (e.g. rent.csv) [4 marks]
title, date_borrowed (mmm dd, yyyy),number of days, due date, rent fee, amount
Notes:
amount = number of days * rentfee
due date = borrowed date + number ofdays (format: MMM dd, yyyy)
ex. Jun 5, 2022 + 3 … therefore, due date will be Jun 8, 2022
1 record per row.
*/