Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

java
image text in transcribed
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: 1. subtotal that returns the calculated value that is the number of days rented times the daily rate of the video 2. tax which returns the tax calculated by multiplying the subtotal by 6% 3. 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

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

Step: 3

blur-text-image

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 Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

How is revenue related to retained earnings?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago