Write a code for a banking program. a) In this question, first, you need to create a Customer class, this class should have: • 2 private attributes: name (String) and balance (double) • Parametrized constructor to initialize the attributes • Methods: i. public String toString() that gives back the name and balance ii. public void addPercentage; this method will take a percentage value and add it to the balance b) Second, you will create a driver class and ask the user to enter 6 customers’ information and then you will create an array of Customer objects. c) Then you use this array used for various operations as shown in the output. • Using the array of customer objects, you need to search for all customers who have less than $150 • Using the array of customer objects, you need to get the average balance of the balances in this array • Using the array of customer objects, you need to get the customer with the highest balance and lowest balance • Using the array of customer objects, you need to show all accounts after a 15% balance increase You need to use loop/conditionals class variables must be private
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Write a code for a banking program.
a) In this question, first, you need to create a Customer class, this class should have:
• 2 private attributes: name (String) and balance (double)
• Parametrized constructor to initialize the attributes
• Methods:
i. public String toString() that gives back the name and balance
ii. public void addPercentage; this method will take a percentage value and
add it to the balance
b) Second, you will create a driver class and ask the user to enter 6 customers’ information
and then you will create an array of Customer objects.
c) Then you use this array used for various operations as shown in the output.
• Using the array of customer objects, you need to search for all customers who
have less than $150
• Using the array of customer objects, you need to get the average balance of the
balances in this array
• Using the array of customer objects, you need to get the customer with the
highest balance and lowest balance
• Using the array of customer objects, you need to show all accounts after a 15%
balance increase
You need to use loop/conditionals
class variables must be private
![For 6 customers enter the name and in the next line the balance
Sam
69.8
Mary
225
Mark
189.5
Ana
34.5
Johnny
446.7
Jessy
88.6
Search for all customers who have less than $150
Sam
Ana
Jessy
The average balance is: 175.6833333333333
The customer with the highest balance is: Johnny
The customer with the lowest balance is: Ana
Show all accounts after a 15% balance increase
Sam has
Mary has
Mark has
Ana has
Johnny has
Jessy has
$80.27
$258.75
$217.925
$39.675
$513.7049999999999
$101.88999999999999](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F72e8d581-ae3a-4654-b4a9-1f5dd378bfef%2Fab53b922-1394-43c9-a40f-1dae7a929d49%2Fe2x6ruu_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)