Find Jobs
Hire Freelancers

really simple video store

$30-50 USD

Concluído
Publicado há aproximadamente 22 anos

$30-50 USD

Pago na entrega
CONCEPTS: Linked Lists write a program for running a (simple) video store When a customer comes to the check out counter, the assistant asks if the customer has been there before. If the customer has not been to the store before, the new customer has to be added to the system: name and credit card number of the customer are required for this. If the customer is not new, the assistant asks for his name and retrieves the account for this customer. After the assistant has entered the customer's name into the system, the customer mentions one video title that he would like to check out. The assistant looks up if there are still copies of that video title available. The store has multiple copies of each video, which are distinguished by the title of video together with the copy number. If there are copies left, the assistant gives that video to the customer and updates the inventory system accordingly (i.e. adds the information that this copy of this title has been checked out by this customer and the due date). If the store is out of copies of that video, then nothing needs to be done. Otherwise, the assistant tells the customer the total amount he has to pay. The customer is charged $3.99 for a 3-day rental of a new release, and $2.99 for a 5-day rental of a classic video. The customer also has to pay any outstanding balance of his account (late fees of previous rentals), if applicable. Assume that all customers pay the whole amount right away, so after checkout the customer's account balance should be 0.00. When customers bring back videotapes, they simply throw them into the drop box. When the shop assistants take the videotapes out of the drop box, the videos are identified by the title and the number of the tape copy, and the inventory needs to be updated with the information that that particular tape was brought back. If that tape was overdue, the customer's account should be charged with $2 per late day. The customer who rented this movie can be determined because that information was stored in the record for that videotape at checkout time. 1. You need a sorted list of video title records, and a sorted list of customer records. The sorted-list code should be implemented as a linked list in both cases. The video title list and customer list should be ordered alphabetically by name. 2. You'll need a class to store the information pertaining to a video title, and another to store the information pertainin ## Deliverables 2. You'll need a class to store the information pertaining to a video title, and another to store the information pertaining to a particular copy of a video (a tape). As explained in the description of the store, there are several copies of each video title. The video title class should contain a list of the copies of this video title (who rented this copy, when is it due, etc). To recap: you have to implement the list of video titles with a linked list, but you should implement the list of copies of each title with an array. Assume that the name of the video title (e.g cats&dogs) is a single word that does not contain spaces. Notice that you'll have to update a customer's record if the videotape (a particular copy) is brought back late. 3. You'll need another class to store the information pertaining to a customer. the customer record should NOT contain a list of the movies that the customer has currently checked out, only the necessary financial information (and the customer's name of course). Assume that the customer has only one name to simplify the assignment. Read the description very carefully all data pieces mentioned should be represented in your program (due dates, customer balance, etc.) Further details: 1. Do not use STL classes, but using C++ string class is a MUST. 2. assume there is a global integer variable today that contains the day of the year to represent the date (i.e. January 1 is day 1, and Dec 31 is day 365). At the start of the program, this day should be initialized with 100. 3. At the start of the program, the program should read the list of video titles from an input file "[login to view URL]". The file contains information about each video title in the following form (one title per line): videotitle numberofcopies newrelease videotitle is a single word (string), numberofcopies is an integer, and newrelease is either 1 or 0. The name of the input file should be passed into the program as command-line argument. [login to view URL] that at the start of the program, all videos are in the store, and the store does not have any customers yet. 5. Assume that the assistant enters all video titles and customer names in small caps. 6. You do not have to implement elaborate error checking, only what's specifically indicated below. User interface: The main function should offer the user (i.e. the store assistants) the following options in a loop that returns to this menu after finishing the respective task (with exception of the last one): 1. add new customer 2. check-out 3. return video 4. advance day 5. exit program The user should type in the number (1-5) to select an option. For the first three options, the program has to ask for additional information as necessary For option 1, the program should ask for and input the name of the customer. Don't add this customer if the name is already in the list. Thus, the program output and user input should look like: Enter new customer name and credit card number: john_smith 123456789 john_smith added as a customer for option 2, assume that only a single video is to be checked out each time. If the customer wants more than one tape, the assistant will have to choose that option again, and the customer will get one bill for each tape. That's not particularly realistic but it'll keep the user-interaction code simple. Thus, in option 2 the program should ask for the customer name and the video name: Enter customer name and video name john_smith star_wars This rental should be rejected if john smith is not a customer, if star wars is not a movie or if all copies of star wars are checked out. ## Platform For option 3, the program should ask for the movie name and copy number. Enter movie name and copy number star_wars 2 Reject this if the movie name is wrong, the copy number does not exist, or the copy has not been checked out. Notice that the customer name is NOT available, only the tape title and copy number. Make sure that you update all data structures properly: the tape should be available after it's returned, and the customer needs to be charged money if the tape was late. For option 4, the program should simply increase the day variable. For option 5, the program should deallocate all dynamically allocated memory and then exit. [login to view URL]: casablanca 3 0 goldfinger 2 0 terminator 2 0 planet_of_the_apes 2 0 doctor_zhivago 1 0 easy_rider 3 0 ghostbusters 2 0 shrek 5 1 legally_blonde 5 1 cats_&_dogs 3 1 the_golden_bowl 3 1 the_animal 5 1 PLATFORM UNIX ## Deadline information MOST OF THE WORK COMPLETE IF NOT ALL BY APRIL 21ST NIGHT
ID do Projeto: 2847513

Sobre o projeto

6 propostas
Projeto remoto
Ativo há 22 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$17 USD em 14 dias
5,0 (35 avaliações)
5,0
5,0
6 freelancers estão ofertando em média $35 USD for esse trabalho
Avatar do Usuário
See private message.
$34 USD em 14 dias
4,9 (212 avaliações)
5,8
5,8
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
4,6 (60 avaliações)
4,5
4,5
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
5,0 (15 avaliações)
3,7
3,7
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
4,7 (32 avaliações)
3,3
3,3
Avatar do Usuário
See private message.
$34 USD em 14 dias
4,9 (5 avaliações)
2,8
2,8
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
5,0 (4 avaliações)
1,3
1,3

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
5,0
11
Membro desde abr. 20, 2002

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.