Write Error Free Java Program Following Things Q37193021

Write an error-free Java program to do the followingthings.

You are tasked with writing a program to track account balances for a new bank. The bank offers customers a Savings account a

Sample output: MM Maccount: jones has a balance of 1500.0 MM&Maccount: jimmy has a balance of 150.0 MM MBalance after transac


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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.