电影租赁计划 [英] The movie rental program

查看:90
本文介绍了电影租赁计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了这项任务。作为一名成员,我想和你一起学习这个课程。我希望我能在接下来的两个小时内和你在一起。

这是下面的程序。$ / $

计划2

MULTICHOICE视频租赁店需要一个面向对象的程序,处理有关其库存中十(10)个视频的以下信息

?标题,导演,制作的年份以及每个视频的主要演员列表。 (如果有超过五个主要演员,只包括五个最着名的演员)

?将信息输入每个视频对象的函数setVideo

?功能getVideo在屏幕上显示特定视频的信息

?客户(通过身份证明)加上他的全名和地址可以每天最多借用2个视频@ R12.50。如果延迟退房,酒店将收取每天10%的罚款。借款期最多为7天

?视频标题的长度不应超过25个字符。如果发生这种情况,请将长度缩短为最多25个字符

?如果在处理借入交易之前未租借,则应检查视频。如果借来的话,客户应该被要求进行第二选择,或者当视频预计回到商店时被告知

?如果商店未能在7天内收到视频,则视为永久性损失,客户需支付R400.00的赔偿费

?有关任何时间点库存电影数量的信息应该随时可用

?在业务结束时,应该生成一份报告,显示

o哪些电影是出租的,什么时候到期

o向哪些客户借款

o剩下哪些视频

o当天收集了多少钱

生成自己的测试数据,测试所有案例以说明准确性和一致性你的程序


所以我不确定是使用两个类,还是使用struct customer和一个电影类。

i''ve be given this task to do. as a member i want to learn this program while i''m doing it with you.i''m hoping i''ll be with you through the next two hours.
this is the program below.


Program 2
MULTICHOICE VIDEO RENTAL SHOP needs an Object Oriented program that process the following information about ten (10) videos in their stock
? The title, the director, the year produced and a list of main actors for each video. (If there are more than five main actors, include only the five most famous actors)
? The function setVideo that input information into each video object
? The function getVideo that displays information of a particular video on the screen
? A customer (identified by ID) plus his full names and address can borrow at most 2 videos @ R12.50 per day. A penalty of 10% per day is charged if returned late. The borrow period is at most 7 days
? Video titles should not exceed 25 characters in length. If that happens, truncate the length to a most 25 characters
? A video should be checked if is not rented out before borrow transaction is processed. If borrowed out the customer should either be requested for the second choice or be advised when the video is expected back in the shop
? Failure for the shop to receive the video back within 7 days, is considered permanent loss and the customer is liable to a R400.00 compensation fee
? Information about the number of films in stock at any point in time should be readily available
? At the end of business, a report should be generated showing
o Which films are rented out and when are they due
o To which customers they are borrowed to
o Which videos are left in stock
o How much money was collected for the day
Generate your own test data that will test all cases to illustrate the accuracy and consistency of your program


so i''m not sure whether to use two classes,or to use struct customer and a movie class.

推荐答案

这是我程序的第一部分,包括两个用于视频的课程,另一个用于客户的课程

this is the first part of my program including two classes one for the video and the other for customers

展开 | 选择 | Wrap | 行号


请伙计们我很沮丧

please guys i''m frustrated

展开 | 选择 | 换行 | 行号



请伙计们我很沮丧
please guys i''m frustrated



你在哪里感到沮丧?你想做什么'不行?怎么不行?来吧,Nkhosinathie,你已经在这里足够长的时间知道这应该如何工作,你必须帮助我们!


PS - 下次回复/创建一个帖子,请仔细阅读页面右侧的方框 - 他们会告诉您如何正确使用代码标签。

Where are you frustrated? What are you trying to do that''s not working? How is it not working? Come on, Nkhosinathie, you''ve been here long enough to know how this is supposed to work, you have to help us!

PS - Next time you respond/create a thread, please read the box on the right side of the page very carefully - they will show you how to use code tags properly.


这篇关于电影租赁计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆