Solved

The Class Ticket Has Been Coded as Follows

Question 93

Essay

The class Ticket has been coded as follows. Code a method that switches the value of service: if it is A, it changes to B; if it is B, it changes to A.
public class Ticket
{
private double price;
private char service;
public Ticket( double newPrice, char newService )
{
setPrice( newPrice );
setService( newService );
}
}

Correct Answer:

verifed

Verified

public void switchSe...

View Answer

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

Related Questions