Question: OOP java Q1 : Q 2: public String getAcc_holder() { return(this.acc_holder); } Question 1: Complete the Bank Account class below: public void setAcc_holder(String acc_holder) {

OOP java

Q1 :

OOP java Q1 : Q 2: public String getAcc_holder() { return(this.acc_holder); }

Q 2:

Question 1: Complete the Bank Account class below: public void setAcc_holder(String acc_holder)

public String getAcc_holder() { return(this.acc_holder); } Question 1: Complete the Bank Account class below: public void setAcc_holder(String acc_holder) { if(acc_holder == null) throw new NullPointerException("No name for account holder!"); public class Bank Account { private int acc_num; private String acc_holder; private double balance; this.acc_holder = acc_holder; } public int geBalance() { // Full-Argument Construcor // Check that input acc_id argument is NOT ZERO or NEGATIVE // Check that input acc_holder argument is NOT NULL // Check that input balance argument is NOT NEGATIVE public BankAccount ) { } // Check that inpuut argument is NOT NEGATIVE public void setBalancel ) { o } } // No-Argument Construcor : MUST CALL Full-Argument Constructor public Bank Account() { // MUST return BankAccount(ID = acc_numb, Name = acc_holder has balance Saudi Riyals) @Override public String toString() { } } public int ge Acc_num() { // Note: 2 BankAccount are equal if they have the same account number and different otherwise. @Override public boolean equals(Object other) { } // Check that input argument is NOT ZERO or NEGATIVE public void setAcc_num( ) { } } Question 2: } Question 2: } You are given classes called Person, Student, Faculty, Employee and Man- ager. public class Manager { Assume that the class Person is defined as follows: public Boolean getStatus() { public class Person { } } public String getName() { } 2.1 Complete the main() method below to create an array of 200 objects of different types (Person, Student, Faculty, Employee and Manager) in a random fashion. } 1. Complete the class definitions below: public static void main(String[] args) { public class Student { public int getId() { } } 2.2 Make sure to call the following methods in the main() method: } public String getName() public class Faculty { public int getId() public String getRank() { public String getRank() } public double get Salary() } public Boolean getStatus() public class Employee { public double get Salary() { public static void main(String[] args) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!