Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create three classes: Customer, Video, and Invoice that might be used in a video rental store application. The Customer class represents a customer. It should

Create three classes: Customer, Video, and Invoice that might be used in a video rental store application.

The Customer class represents a customer. It should have 6 attributes: customer name (String), customer street address (String), city (String), state (String), zip code (String), and telephone number (String). For the Customer class provide a parameterized constructor that receives the customer name, street address, city, state, zip code, and telephone number as parameters. Provide getter methods as needed for the assignment.

The Video class represents a video being rented. It should have 4 attributes: video name (String), year (integer), copy number (integer), and daily rental rate (double). For the Video class, provide a parameterized constructor that receives the video name, year, copy number and daily rate. Provide getter methods as needed for the assignment.

An Invoice object represents a rental of a video to a given customer. It includes 4 attributes: the customer renting the video, the video being rented, date rented (String), and the number of days rented (integer). For the Invoice class, provide a parameterized constructor that receives a customer, video, date rented, and days rented as parameters. Provide getter methods for all instance variables. Provide 3 methods:

subtotal that returns the calculated value that is the number of days rented times the daily rate of the video

tax which returns the tax calculated by multiplying the subtotal by 6%

total which returns the subtotal plus tax

Lastly, provide a public printInvoice method that prints a complete invoice (i.e. all customer information, video being rented, and calculated subtotal, tax and total) in a well formatted report using the 3 methods list above.

Develop a test application named Prog4 that tests your three classes. The test application must print at least three invoices for at least two different customers and two different videos.

Your source code should be documented using Javadoc style according to the course standards. Abide by good programming practices.

Requirements

Your source code should follow the Java programming standards for the course.

Your source code should be documented using Javadoc style according to the course standards.

Use the default package in your project; do not specify a package in your code.

Use any file and class names specified in the assignment.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

What is float? Why is it important to cash management?

Answered: 1 week ago

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago