Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 1 ) Create a default Constructor. Set the seed value for your random number generator inside the Constructor. The seed value will be assigned

(1) Create a default Constructor. Set the seed value for your random number generator inside the Constructor. The seed value will be assigned to you.
(3) Create a private method "generateRandomInt" that returns a new integer value between 0 and 100.
(5) Create an "updateTransaction" method to accept a Customer Name, Transaction Type and Amount as parameter, and update the Total Amount. Print a message for a successful or unsuccessful transaction. Increase transaction count by 1 if successful. Valid Transaction Types are:
i. credit - increases total amount
ii. debit - decreases total amount
(5) Create a "displayCustomerList" method that generates a summary report
i. The title is right justified with a minimum of 32 characters
ii. Column 1 is left justified with a minimum of 25 characters, and will display the Customer Name
iii. Column 2 is right justified with a minimum of 23 characters, and will display the Total Amount to two decimal place
iv.
v. Customer Name
Customer List
vi. Custoner Nane
Total Amount
vii. John_Smith
viii. Jane_Doe
Total Amount
$52.67
$-21.00
George washington $ 17.76
Captain_Kirk $-34.02
Total Customers: 4
Total Amount: $ 15.41
5) Create a "displayHistogram" method that generates a transaction count report
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions