Solved

The Class Ticket Has Been Coded as Follows

Question 54

Short Answer

The class Ticket has been coded as follows:
public class Ticket
{
private double price;
private char service;
public Ticket( double newPrice, char newService )
{
setPrice( newPrice );
setService( newService );
}
}
In a client class and inside the main method, myTicket is an object reference of type Ticket. Call the method tax with myTicket, assuming a tax rate of 0.06, and assign the resulting tax value to a variable named myTax.
float taxRate = 0.06f;
// Your code goes here

Correct Answer:

verifed

Verified

double myT...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions