Odds and Evens & Bank Account Java Coding Problems

P ROBLEMCreate a program called “OddsAndEvens.java” that includes a method “void getGreater(int[]
arr)”, which prints whether there are more odds or more evens in the provided array arr. You
may either hard-code the contents of the array or allow the user to fill out the array
themselves, but they should occur inside of the main method. After this is completed,
getGreater() should be called in the main method.
P ROBLEM 2
Create a program called “BankAccount.java”, which should have a constructor that accepts a
String, and integer, and a double for account name, account number, and current balance
respectively in order to create the object. Number of transactions should always start at 0.
BankAccount should have the following attributes:
● Account name (String)
● Account Number (int)
● Current Balance (double)
● Number of Transactions (int)
And the following methods:
● getName():String – Returns the name of the account.
● getNumber():int – Returns the account number.
● getBalance():double – Returns the balance of the account.
● getTransactions():int – Returns the number of transactions.
● getInterest():double – Returns the amount of interest the account will generate in a year
(This is always 5% of the current balance)
● deposit(double value):void – Adds the given value to the current balance, number of
transactions is incremented by one.
● withdraw(double value):void – removes the given value from the balance, number of
transactions is incremented by one.
When finished, use the included file “BankTeller.java” to check your work. Ensure that
BankTeller.java is in the same package as BackAccount.java

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER