Question
IN JAVA LANGUAGE PLEASE: Create three classes: Customer, Video, and Invoice that might be used in a video rental store application. The CUSTOMER class represents
IN JAVA LANGUAGE PLEASE:
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 parametrized constructor that receives the customer name, street address, city, state, zip code, and telephone number as parameters. Provide getter methods as needed for this 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 this 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 three methods:
SUBTOTAL that returns the calculated value that is the number of days rented times the daily rate of the video.
TAX which return the tax calculated by multiplying the subtotal plus tax.
TOTAL which returns the subtotal plus tax .
Lastly, provide a printInvoice method that prints a complete invoice 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 DIFFERENT INVOICES FOR ATLEAST TWO DIFFERENT CUTSOMERS AND TWO DIFFERENT VIDEOS.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started