Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Supplemental Assignment Background Entertainment venues not only sell tickets to events, they often provide ancillary services (parking, early access, etc) To track all of these

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

Supplemental Assignment Background Entertainment venues not only sell tickets to events, they often provide ancillary services (parking, early access, etc) To track all of these objects, several class hierarchies would be necessary. Several interfaces would also be created to standardize functionality across those hierarchies Provided to You The following are provided: These instructions UML diagrams for several classes and an interface Sample output showing structure for toString returns and results of tax calculations The grading rubric for use with this assignment NOTE: There is no provided test harness. Deliverables Zip the following source files and post the zipped folder as an attachment to the assignment on Blackboard. Zipped folder(s) with multiple levels are subject to a 10-point deduction from the final score Ticket.java Taxes.java VIP.java General.java ValetParking.java Do not submit class code (.class) or edit/backup code (.java). Submit only the specified source files (.java) in the specified format Requirements Ticket The Ticket class will be defined as an abstract class and uses the interface Taxes. The interface method checkTaxable should be defined concretely in Ticket; calculateTax should not. VIP The VIP class is a subclass of Ticket. It will need to provide concrete implementation for the interface method calculateTax General The General class is a subclass of Ticket. It will need to provide concrete implementation for the interface method calculateTax ValetParking The ValetParking class is not part of the Ticket hierarchy. It also uses the Taxes interface Additional Requirements Note these additional requirements: . Comments o Short description of class at beginning of code o Some descriptive comment for each variable o Some descriptive comment for each methood o Comments must be logically correct o Comments must be pertinent to the associated code o Comments should be viewable without scrolling right to see the remaining portion of the line Code organization o Instance variables should show some organization o Methods in class should show some organization e Coding Standards o Constructors will use set methods to establish values for instance variables o Set and get methods will use standard naming O Single character variable names are forbidden o Generous use of white space is required O Lines of code should be broken up and continued if viewing the entire line will require scrolling right Grading Notes Your submission must meet the following criteria in order to be graded: Clean compile Error-free execution Correct use of standards Code that does not compile with the GRADING CODE (not provided to students) will be assigned a grade of ZERO (0). The grading code includes processes to verify standard naming of set/get methods, standard header structures for set/get methods, correct instance variable declarations, and adherence to the provided UML with respect to headers for additional methods. Please refer to the published Basic Coding Standards for additional information Ticket abstract, implements Taxes Attributes private date: int private event: Strin Notes Integer value representing date of event in yyyymmdd format String object holding the titleame of the event Integer value representing the sequential ticket number Integer value representing date this Ticket was sold in yyyymmdd format Indicates if seller is a non-profit (N) or for-profit (P) organization. Tickets sold by non profits (N) are not taxable. Tickets sold by a for-profit (P) organization are taxable rivate nbr: int rivate soldDt: int private soldBy: char private buyer: String String object holding name/title of ticket seller. This may be an individual or a ticketing service Operations public Ticket ( ): Ticket public Ticket( tDate: int, Description Null constructor; accepts no values Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String): Ticket public toString): Strin Returns a formatted String object containing all the instance varriable values Taxes (interface) Attributes Notes static final TAXRATE: double Set to.0825 Description Operations public checkTaxablel): boolean public calculateTax(): double Returns true if the object is taxable- false if the object is not taxable Returns a double holding the amount of tax to be charged. If the specific object is non-taxable, this value will always be zero. If the specific object is taxable, this be will the face value of the objectTAXRATE VIP extends Ticket Attributes private price: double private section: String private photo: boolean Notes Price of VIP ticket Seating section Indicates whether photo w/ artist is included Operations public VIP ): VIP public VIP( tDate: int, Description null constructor Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String, vPrice: double, vSection: String, vPhoto: boolean ): VIP public toString( ): String Returns a formatted String object containing all the instance varriable values Attributes private price: double private section: String private service: boolean General extends Ticket Notes Price of VIP ticket Seating section Indicates whether seat/table service is available Operations publicGeneral( ): Geeral public General( tDate: int, Description null constructor Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String, gPrice: double, gSection: String, gService: boolean): General public toString(): String Returns a formatted String object containing all the instance varriable values. ValetParking implements Taxes Notes Attributes private date: int private event: String private claim: String private cost: double Integer value representing date of event in yyyymmdd format String object holding the titleame of the event String object holding the claim ticket code for vehicle Double value represeting the cost of the parking service NOTE: Parking costs are taxable Operations public ValetParking ): ValetParking public ValetParking( pDate: int, Description Null constructor; accepts no values Full constructor, accepts values for all instance variables pEvent:String pClaim: String, pCost: double ): ValetParking public toString(): String Returns a formatted String object containing all the instance varriable values Sample Output from Possible Test Harness Showing structure of toString output and results of tax calculations Output of toString calls in Classes VIP Ticket Date0 Event: null Nbr: 0 SoldDt: 0 SoldBy: Buyer: null Price : $0.00 Section: null Photo false VIP Ticket Date 20181022 Event: B52s Nbr 2456852 SoldDt: 20180715 SoldBy: P Buyer: USAA Price: $225.00 Section: OL2 Photo false VIP Ticket Date 20181109 Event Billy Idol Nbr SoldDt 20180923 SoldBy: N Buyer: CCharities 6325843 Price $475.50 Section: OCO Photo : true General Ticket Date 0 Event: null Nbr0 SoldDt 0 SoldBy Buyer null Price : $0.00 Section nul.1 Service: false General Ticket Date 20181922 Event:B52s Nbr2456852 SoldDt: 20180715 SoldBy: P Buyer: USAA Price : $65.50 Section M1ce Service: true General Ticket Date 29181109 Event: Billy Idol Nbr:6325843 SoldDt: 20180923 SoldBy: N Buyer: cCharities Price $49.75 Section M2R1 Service: false ValetParking Datee Event: null Claim null Cost $0.00 ValetParking Date 20181013 Event: UTSA Homecoming Claim VP03-8542 Cost $10.50 Calculate Taxes Payable on Above Object:s VIP VIP VIP General General General ValetParking ValetParking $ e.00 18.56 0.00 $ 0.00 $ 5.40 $ 0.00 $ e.00 $ 0.87 Total Taxes: % 24.83 Supplemental Assignment Background Entertainment venues not only sell tickets to events, they often provide ancillary services (parking, early access, etc) To track all of these objects, several class hierarchies would be necessary. Several interfaces would also be created to standardize functionality across those hierarchies Provided to You The following are provided: These instructions UML diagrams for several classes and an interface Sample output showing structure for toString returns and results of tax calculations The grading rubric for use with this assignment NOTE: There is no provided test harness. Deliverables Zip the following source files and post the zipped folder as an attachment to the assignment on Blackboard. Zipped folder(s) with multiple levels are subject to a 10-point deduction from the final score Ticket.java Taxes.java VIP.java General.java ValetParking.java Do not submit class code (.class) or edit/backup code (.java). Submit only the specified source files (.java) in the specified format Requirements Ticket The Ticket class will be defined as an abstract class and uses the interface Taxes. The interface method checkTaxable should be defined concretely in Ticket; calculateTax should not. VIP The VIP class is a subclass of Ticket. It will need to provide concrete implementation for the interface method calculateTax General The General class is a subclass of Ticket. It will need to provide concrete implementation for the interface method calculateTax ValetParking The ValetParking class is not part of the Ticket hierarchy. It also uses the Taxes interface Additional Requirements Note these additional requirements: . Comments o Short description of class at beginning of code o Some descriptive comment for each variable o Some descriptive comment for each methood o Comments must be logically correct o Comments must be pertinent to the associated code o Comments should be viewable without scrolling right to see the remaining portion of the line Code organization o Instance variables should show some organization o Methods in class should show some organization e Coding Standards o Constructors will use set methods to establish values for instance variables o Set and get methods will use standard naming O Single character variable names are forbidden o Generous use of white space is required O Lines of code should be broken up and continued if viewing the entire line will require scrolling right Grading Notes Your submission must meet the following criteria in order to be graded: Clean compile Error-free execution Correct use of standards Code that does not compile with the GRADING CODE (not provided to students) will be assigned a grade of ZERO (0). The grading code includes processes to verify standard naming of set/get methods, standard header structures for set/get methods, correct instance variable declarations, and adherence to the provided UML with respect to headers for additional methods. Please refer to the published Basic Coding Standards for additional information Ticket abstract, implements Taxes Attributes private date: int private event: Strin Notes Integer value representing date of event in yyyymmdd format String object holding the titleame of the event Integer value representing the sequential ticket number Integer value representing date this Ticket was sold in yyyymmdd format Indicates if seller is a non-profit (N) or for-profit (P) organization. Tickets sold by non profits (N) are not taxable. Tickets sold by a for-profit (P) organization are taxable rivate nbr: int rivate soldDt: int private soldBy: char private buyer: String String object holding name/title of ticket seller. This may be an individual or a ticketing service Operations public Ticket ( ): Ticket public Ticket( tDate: int, Description Null constructor; accepts no values Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String): Ticket public toString): Strin Returns a formatted String object containing all the instance varriable values Taxes (interface) Attributes Notes static final TAXRATE: double Set to.0825 Description Operations public checkTaxablel): boolean public calculateTax(): double Returns true if the object is taxable- false if the object is not taxable Returns a double holding the amount of tax to be charged. If the specific object is non-taxable, this value will always be zero. If the specific object is taxable, this be will the face value of the objectTAXRATE VIP extends Ticket Attributes private price: double private section: String private photo: boolean Notes Price of VIP ticket Seating section Indicates whether photo w/ artist is included Operations public VIP ): VIP public VIP( tDate: int, Description null constructor Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String, vPrice: double, vSection: String, vPhoto: boolean ): VIP public toString( ): String Returns a formatted String object containing all the instance varriable values Attributes private price: double private section: String private service: boolean General extends Ticket Notes Price of VIP ticket Seating section Indicates whether seat/table service is available Operations publicGeneral( ): Geeral public General( tDate: int, Description null constructor Full constructor, accepts values for all instance variables tEvent: String, tNbr: int, tSold: int, tSeller: char, tBuyer: String, gPrice: double, gSection: String, gService: boolean): General public toString(): String Returns a formatted String object containing all the instance varriable values. ValetParking implements Taxes Notes Attributes private date: int private event: String private claim: String private cost: double Integer value representing date of event in yyyymmdd format String object holding the titleame of the event String object holding the claim ticket code for vehicle Double value represeting the cost of the parking service NOTE: Parking costs are taxable Operations public ValetParking ): ValetParking public ValetParking( pDate: int, Description Null constructor; accepts no values Full constructor, accepts values for all instance variables pEvent:String pClaim: String, pCost: double ): ValetParking public toString(): String Returns a formatted String object containing all the instance varriable values Sample Output from Possible Test Harness Showing structure of toString output and results of tax calculations Output of toString calls in Classes VIP Ticket Date0 Event: null Nbr: 0 SoldDt: 0 SoldBy: Buyer: null Price : $0.00 Section: null Photo false VIP Ticket Date 20181022 Event: B52s Nbr 2456852 SoldDt: 20180715 SoldBy: P Buyer: USAA Price: $225.00 Section: OL2 Photo false VIP Ticket Date 20181109 Event Billy Idol Nbr SoldDt 20180923 SoldBy: N Buyer: CCharities 6325843 Price $475.50 Section: OCO Photo : true General Ticket Date 0 Event: null Nbr0 SoldDt 0 SoldBy Buyer null Price : $0.00 Section nul.1 Service: false General Ticket Date 20181922 Event:B52s Nbr2456852 SoldDt: 20180715 SoldBy: P Buyer: USAA Price : $65.50 Section M1ce Service: true General Ticket Date 29181109 Event: Billy Idol Nbr:6325843 SoldDt: 20180923 SoldBy: N Buyer: cCharities Price $49.75 Section M2R1 Service: false ValetParking Datee Event: null Claim null Cost $0.00 ValetParking Date 20181013 Event: UTSA Homecoming Claim VP03-8542 Cost $10.50 Calculate Taxes Payable on Above Object:s VIP VIP VIP General General General ValetParking ValetParking $ e.00 18.56 0.00 $ 0.00 $ 5.40 $ 0.00 $ e.00 $ 0.87 Total Taxes: % 24.83

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago