Answer:
The definition of a class Telephone is given as
public class Telephone // class telephone
{
String number; // variable number of type string
static int quantity = 250;
// variable quantity of type int
static double total = 1565.92; // variable total of type double
}
Explanation:
Following is the description of Statement
- Create a class "Telephone" by using the keyword class.In that class we declared data member .
- We declared a variable "number" of type "string" which has no constructor.
- We declared a variable "quantity" of type "int" which is a static type variable. The static type variable retains the value during the program execution.
- We declared a variable "total" of type "double" which is a static type variable. The static type variable retain the value during the program execution .