Write an error-free Java program to do the followingthings.
Answer
Code:
import java.io.*;
import java.util.*;
class Account
{
double bal;
String name;
}
class Savings extends Account
{
double interest;
double min;
boolean charge;
public Savings(double balance, String nam)// savingsaccount constructor
{
bal=balance;name=nam;
interest=2;
min=250;
charge=false;
System.out.println(“account:”+name+” has a balance of “+bal);
}
public
OR
OR