Hello, friends!

Can anyone help me to create a small application in PASCAL for a DVDs Rental Shop?

This applications should be able to do :

Add 25 films (title, gender, cod, status)
Add 15 Costumers (name, sex, age, films rented)

List films
List costumers
List rented movies

and then should have a menu

to add new movies
to list movies
to add new costumers
to list costumers

Can anyone do this big favor to me? :)

Thank you very much!

Recommended Answers

All 5 Replies

Sounds like a homework assignment. If you show your code, and state the problems you have, we'll help you fix them. Do not expect to get full code here.

@pritaeas, Well it's not a homework :)

I am using Dev-Pascal, i have done something like it:

i have made to add movies,

What i do to list them?

Type
    Str25    = String[25];
    T_filme = Record
                Titulo, Genero,COD  : Str25;
                Estado : bollean;
               End;

Procedure EnterNewFilme(var newFilme : T_filme);
Begin
 Writeln('Please enter the filme details: ');
 Write('Filme nome: ');
 Readln(newFilme.Titulo);
 Write('Genero: ');
 Readln(newFilme.Genero);
 Write('COD: ');
 Readln(newFilme.COD);
 Write('Estado: ');
 Readln(newFilme.Estado);
End;

Var
    filmeRecArray : Array[1..10] of T_filme;
    tempFilmeRec  : T_filme;
    filmeRecFile  : File of T_filme;
    i            : 1..10;

Begin
 Assign(filmeRecFile, 'filmerec.dat');
 ReWrite(filmeRecFile);
 For i := 1 to 10 do
  Begin
   EnterNewFilme(filmeRecArray[i]);
   { filmeRecArray[i] now contains the filme details }
   Write(filmeRecFile, filmeRecArray[i]);
  End;
 Close(filmeRecFile);
 Writeln('Thanks for entering the filme details.');
 Writeln('They are saved in a file!');
 Write('Now choose a record to display from 1 to 10: ');
 Readln(i);
 ReSet(filmeRecFile);
 Seek(filmeRecFile, i-1);
 Read(filmeRecFile, tempFilmeRec);
 Close(filmeRecFile);
 Writeln('Here are the filme details of record #',i,':');
 Writeln;
 Writeln('Titulo:  ', tempFilmeRec.Titulo);
 Writeln('Genero: ', tempFilmeRec.Genero);
 Writeln('COD:   ', tempFilmeRec.COD);
 Writeln('Estado:  ', tempFilmeRec.Estado);
 Readln;
End.

Sorry for being prejudiced.

For displaying all movies you can use a similar loop, as you did with entering new films.

And what to do to create a menu?

You can output your menu how you like, and then read a key into a variable. Depending on the value of that, you can do stuff.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.