Question

DVD Rental System Develop a DVD/CD Rental System for a shop that rents out DVDs and...

DVD Rental System

Develop a DVD/CD Rental System for a shop that rents out DVDs and VCDs to its registered customers. The system need to keep track of its rental information and compute rental fees collected from DVDs and CDs rented out to customers.

This DVD Rental System is to be developed with methods using the Java programming language. The DVD rental shop has several DVDs and CDs, and many customers. Each customer is allowed to rent maximum of five DVDs and CDs at any time.

Upon returning DVDs and CDs, the shop assistant shall compute the total fees and it is deducted for the customer’s available credit. The rental fee for each CD is $3 whereas a customer needs to pay $5 per DVD as a rental fee. The borrowing periods of items (CD and DVD) is one week. The customer must pay a fine of $1 per day for returning CD and DVD later than due date.

arrays need to be used:

static String[][] customer_record = new String[50][5];
   static String[][] rental_record = new String[50][5];
   static String[][][] dvd_cd_list = new String[2][500][4];

Your program must provide the following functions to manage the video rental operations:

a. Add customer Add new customer information (1. Name, 2. Address, 3. Phone number, 4. Enrolling date) into the customer list.

b. Delete Customer Delete an existing customer from the customer list. A customer can only deleted from the list if a customer has returned all borrowed items or does not borrow any item.

c. Modify customer Modify an existing customer information (1. Name, 2. Address, 3. Phone number, 4. Enrolling date) into the customer list.

d. Add DVD or CD Add new DVD or CD information (1. Title, 2. Company, 3. Release date) in the DVD and CD list

e. Rental DVD/CD item Keep the code of a customer who borrows DVDs or/and CDs under the respective record of DVD item and the availability flag of the DVD item must be set to be unavailable.

f. Return DVD/CD item

Customer Name: Eugine

DVD Title Number of days Borrowed No of Days Overdue Rental Fee

MAD MAN 5 0 $5

House of Cards 9 2 $9

Total Rental Fee: $14

g. Reporting current DVD/CD store information

The program shall display the list of DVD and CD items rented out to the customers as well as for customer names with the list of DVD and CD rented by each of them as following format.

Video Code Title Borrowed by

DVD000001 MAD MAN Eugine

DVD000009 House of Cards Eugine

CD0110019 Adele Joel

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: Program: public class Raintal public static void main(String [largs c new Cus tomer [10] DVDCD[] d= new DVDCD[10] for//deleting a customer for(int i-0; i<10; i++) if ((c[i].name) . equals (abcll) ) cli] - null; //rental dr0l. borrowed days

String title, company, release date,borrowed by int borrowed days, over due, rentFee public DVDCD () public DVDCD (String titSample Output: sh-4.3s javac Raintal.java sh-4.3 java Raintalava DVD Title DVD1 DVD2 Total Rental Fee: $12 Number of days Bor

Copyable Code:

public class Raintal
{
public static void main(String []args)
{
Customer[] c = new Customer[10];
DVDCD[] d = new DVDCD[10];
  
for(int i=0; i<10; i++)
d[i] = new DVDCD("DVD"+(i+1), "Company" + (i+1), "" +i+1);
  
//add Customer
for(int i=0; i<10; i++)
c[i] = new Customer("abc"+(i+1), "xyz"+(i+1), "123456789");
  
//modifaing a customer
for(int i=0; i<10; i++)
{
if ((c[i].name).equals("abc1"))
{
c[i].name = "xyz11";
c[i].address = "abc11";
}
}
  
//deleting a customer
for(int i=0; i<10; i++)
{
if ((c[i].name).equals("abc11"))
{
c[i] = null;
}
}
  
//rental
d[0].borrowed_days = 5;
d[0].over_due = 0;
d[0].rentFee = 5;
d[0].borrowed_by = c[1].name;
d[1].borrowed_days = 9;
d[1].over_due = 2;
d[1].rentFee = 7;
d[1].borrowed_by = c[3].name;
  
System.out.println("DVD Title Number of days Borrowed No of Days Overdue Rental Fee");
System.out.println(d[0].title + " " + d[0].borrowed_days + " " + d[0].over_due + " $"+ d[0].rentFee);
System.out.println(d[1].title + " " + d[1].borrowed_days + " " + d[1].over_due + " $" + d[1].rentFee);
System.out.println("Total Rental Fee: $" + (d[0].rentFee + d[1].rentFee) + "\n\n");
System.out.println("Video Code Title Borrowed by");
System.out.println("DVD000001" + " " + d[0].title + " " + d[0].borrowed_by);
System.out.println("DVD000001" + " " + d[1].title + " " + d[1].borrowed_by);
}
}

class DVDCD
{
  
String title, company, release_date,borrowed_by;
int borrowed_days, over_due, rentFee;
  
public DVDCD()
{
  
}
  
public DVDCD(String title, String company, String release_date)
{
this.title = title;
this.company = company;
this.release_date = release_date;
}
  
}

class Customer
{
  
String name, address, phone;
int book_rant;
int due;
  
public Customer()
{
  
}
  
public Customer(String name, String address, String phone)
{
this.name = name;
this.address = address;
this.phone = phone;
}
  
}

Add a comment
Know the answer?
Add Answer to:
DVD Rental System Develop a DVD/CD Rental System for a shop that rents out DVDs and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental...

    I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental ID, Rental date, customer ID, customer first name, customer last name, and count of disks rented; sort by Rental ID. Show the Rental date formatted as ‘mm-dd-yyyy.’ Hint: use a GROUP BY clause. 19. 4 points List the disk ID, title name, rating, format description, and fee amount for all copies rented in Rental 3; sort by disk ID. Show the fee amount formatted...

  • Car Rental Management System The aim of this project is to design and implement a computerized...

    Car Rental Management System The aim of this project is to design and implement a computerized Car Rental Management System for a company called COEN244Cars. The company rents two types of cars: standard and luxury cars. A car is identified by a car identification number (int), a type (string), and a flag that indicates whether the car is currently available or not. The company distinguishes between three types of customers: regular customers, corporate customers, and VIPs (Very Important Persons). A...

  • the OOP project is needed to be coded in netbeans and store a information in file...

    the OOP project is needed to be coded in netbeans and store a information in file on local machine it could be stored with xml tags since its easier. OOP Project Description Requirements: You are to design and build software media rental system. The software will track each user’s account with its rentals. A user can rent multiple media of different type/genre and all that user’s rentals are managed under their account (single account per user). A user will be...

  • You are a database consultant with Ace Software, Inc., and have been assigned to develop a...

    You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Johnson Video Store in town. The owners have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with the owners to discuss their business and watch their operation...

  • You are a database consultant with Ace Software, Inc., and have been assigned to develop a...

    You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...

  • This assignment allows students to demonstrate their skills in the area of designing relational databases to...

    This assignment allows students to demonstrate their skills in the area of designing relational databases to satisfy specific business rules and requirements. The deliverables for this assignment include an Entity Relationship Diagram and detailed documentation describing the database design and structure. In this assignment you will be provided with a description of an application (below) to create an entityrelationship diagram (ERD) and design accompanying table layout using sound relational modeling concepts and practices. The relationships between the entities and the...

  • John owns a portfolio of rental properties with his parterns. He wants to develop a database...

    John owns a portfolio of rental properties with his parterns. He wants to develop a database to store property information as well rental data. Below are some of the data that need to be kept track of. For each property, the database needs to store property address, size, number of rooms and bathrooms, and purchase date. There are two types of properties – single family house and condo. Need to store yard size for single family house and monthly HOA(Home...

  • Create a system context diagram of the system. The project to be created is system to...

    Create a system context diagram of the system. The project to be created is system to manages the daily operation of a video rental store. The various process for the video store are described below. It is up to the student to find information contained in the narrative that is relevant to or affects the architecture.:- Purchase Videos. On a weekly basis, the system uses web services provided by the vendors to monitor the availability of new videos for purchase....

  • this needs to be in Java: use a comparator class which is passed into the sort...

    this needs to be in Java: use a comparator class which is passed into the sort method that is available on the ArrayList. import java.util.Scanner; public class Assign1{ public static void main(String[] args){ Scanner reader = new Scanner (System.in); MyDate todayDate = new MyDate(); int choice = 0; Library library = new Library(); while (choice != 6){ displayMainMenu(); if (reader.hasNextInt()){ choice = reader.nextInt(); switch(choice){ case 1: library.inputResource(reader, todayDate); break; case 2: System.out.println(library.resourcesOverDue(todayDate)); break; case 3: System.out.println(library.toString()); break; case 4: library.deleteResource(reader,...

  • HELLO, PLEASE TAKE TIME TO ANSWER THIS QUESTION. PLESE ENSURE ITS CORRECT AND SHOW THAT THE...

    HELLO, PLEASE TAKE TIME TO ANSWER THIS QUESTION. PLESE ENSURE ITS CORRECT AND SHOW THAT THE PROGRAM RUNS. Task 1: Enforcing const-ness throughout Your first job will be to go through all of the code and decide which functions should be declared const. You should find several places throughout the program where this makes sense. We will also make the id data member in the Customer class const , as once a customer has been created their ID will never...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT