Help with assignment

Write your question here.
New to C++ and have an assignment to complete, running short on time and I have spent hours on this already. Feeling like I'm not making the progress I should be. Any help would be good. Thanks.

Write a program to manage DVD rental in a video rental in a video rental store. Create an abstract data type that represents a DVD in this store. Consider all the data and operations that may be necessary for the DVC type to work well within a rental management system. Include a print() member function that displays all the information about the DVD. Test your data type by creating an array of ten DVD instances and filling them in using information read from a test input file that you create. Display the DVD information.



Here's my text file.

dvdlist.txt



string dvd;

dvd(title, genre, rentdate, returndate)



dvd 1(1.title, 1.genre, 1.rentdate, 1.returndate)

dvd 2(2.title, 2.genre, 2.rentdate, 2.returndate)

dvd 3(3.title, 3.genre, 3.rentdate, 3.returndate)

dvd 4(4.title, 4.genre, 4.rentdate, 4.returndate)

dvd 5(5.title, 5.genre, 5.rentdate, 5.returndate)

dvd 6(6.title, 6.genre, 6.rentdate, 6.returndate)

dvd 7(7.title, 7.genre, 7.rentdate, 7.returndate)

dvd 8(8.title, 8.genre, 8.rentdate, 8.returndate)

dvd 9(9.title, 9.genre, 9.rentdate, 9.returndate)

dvd 10(10.title, 10.genre, 10.rentdate, 10.returndate)



1.title = Waynes World

2.title = Mission Impossible

3.title = Top Gun

4.title = The Avengers

5.title = Cool Runnings

6.title = Gladiator

7.title = Thor

8.title = Good Will Hunting

9.title = Wolf Of Wall Street

10.title = Castaway



1.genre = Comedy

2.genre = Action

3.genre = Action

4.genre = Action

5.genre = Comedy

6.genre = Action

7.genre = Superhero

8.genre = Drama

9.genre = Drama

10.genre = Drama



1.rentdate = Oct 28,21

2.rentdate = Nov 4,21

3.rentdate = Nov 17,21

4.rentdate = Nov 20,21

5.rentdate = Oct 15,21

6.rentdate = Oct 31,21

7.rentdate = Nov 11,21

8.rentdate = Nov 18,21

8.rentdate = Nov 19,21

9.rentdate = Oct 22, 21

10.rentdate = Oct 27,21



1.returndate = Nov 4,21

2.returndate = Nov 11,21

3.returndate = Nov 24,21

4.returndate = Nov 21,21

5.returndate = Oct 22,21

6.returndate = Nov 7,21

7.returndate = Nov 25,21

8.returndate = Nov 26,21

9.returndate = Oct 29,21

10.returndate = Nov 3,21



and my program



#include <iostream>

#include <fstream>

#include <string>



using namespace std;



int main() {

string line;

char number\[10\];

string title;

string genre;

string rentdate;

string returndate;

string dvd\[10\];



ifstream dvds;

[dvds.open](https://dvds.open) ("dvdlist.txt");

while(getline(dvds, line)) {

cout << "Enter number for DVD from 1-10" << endl;

cin.get(number, 10);

cout << line << '\\n';

}

return 0;

}
A couple of things.

1. Edit your post to put [code][/code] tags around the code.
https://www.cplusplus.com/articles/jEywvCM9/

2. Remove the spammy link so it doesn't look like you're just some repost bot trying to spam the forum with a link disguised as a question.
Create an abstract data type that represents a DVD in this store. Consider all the data and operations that may be necessary for the DVC type to work well within a rental management system.
You're expected to create a struct/class that defines what a DVD is. You kinda already know what that is, title, genre, rentdate, returndate

Then you need to create some methods around that. So think of the thinks you'd do with a DVD entry, create it, rent it to someone, accept the return; you should have methods for those things.

You'll also need to store all these DVDs somewhere in memory, and maybe, read from and write to a file.

Once you have that stuff, you can interact with the user to list, check-out/return stuff ...
Registered users can post here. Sign in or register to post.