Solved

The Class Ticket Has Been Coded as Follows

Question 39

Essay

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 );
}
}
Consider the following constant of class Ticket:
public static char DEFAULT_SERVICE = 'B';
In a client class and inside main, write a statement to output the value of the above constant.

Correct Answer:

verifed

Verified

System.out.println( ...

View Answer

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents