Good afternoon. I'm doing DAW and it starts to get complicated and I'm a bit lost. I paste the part of the statement and I do not understand highlighted in bold:
In this task, a set of classes will be made to model the different types of accounts that a person can have in a bank, using the inheritance mechanism. The points that must be addressed to solve the task are:
Create a project in NetBeans called, "Banking Accounts".
Within said project, create a package called "Banking Model".
Inside the package "Banking model", create a class called Client, that models the different customers of the bank that have an associated account to store their money. The characteristics of the Client class are:
Attributes (All attributes of the Client class must have private visibility):
idCliente : integer that represents the unique identifier of the client within the bank. name : string of characters that represents the name of the bank's customer.
address : character string representing the address where the bank customer lives. phone : string of characters representing the phone that allows you to contact the customer.
Methods (All methods of the Client class must have public visibility):
constructor without parameters: constructor that initializes all the attributes of type strings of characters to the value null and the integers to 0. constructor with parameters: constructor that have as many parameters as attributes has the class, and that initializes each one of the attributes with the value of the corresponding parameters.
Inside the package "Banking model", create an abstract class called "Account", which models the different bank accounts that the financial institution maintains where customers deposit their money. Attributes (All attributes of the Account class must have protected visibility)
AccountNumber : integer that represents the unique identifier associated with each of the bank's accounts.
Balance : actual number representing the amount of money stored in that account.
holder: attribute of type Client that represents the person associated with that account.
Methods (All methods of the Account class must have public visibility) constructor without parameters: constructor that initializes the client holder of the account to null, and the balance and the account number to zero. constructor with parameters: constructor that have as many parameters as attributes has the class, and that initializes each one of the attributes with the value of the corresponding parameters.
There I lose myself, I do not understand what is meant by "Customer type". In other words, it must be that this attribute is the entire class called "Client". I put what I've done so far:
Class "Customer":
package modeloBancario;
public class Cliente {
private int idCliente;
private String nombre;
private String direccion;
private String telefono;
public Cliente (){
}
public Cliente (int idCliente, String nombre, String direccion, String telefono){
this.idCliente = idCliente;
this.nombre = nombre;
this.direccion = direccion;
this.telefono = telefono;
}
public int getIdCliente(){
return idCliente;
}
public void setIdCliente(int idCliente){
this.idCliente = idCliente;
}
public String getNombre(){
return nombre;
}
public void setNombre(String nombre){
this.nombre = nombre;
}
public String getDireccion(){
return direccion;
}
public void setDireccion(String direccion){
this.direccion = direccion;
}
public String getTelefono(){
return telefono;
}
public void setTelefono(String telefono){
this.telefono = telefono;
}
}
And the "Account" class:
package modeloBancario;
public abstract class Cuenta {
protected int numeroDeCuenta;
protected double saldo;
protected Cliente titular;
public Cuenta(){
numeroDeCuenta = 0;
saldo = 0;
titular ();
}
}
I would appreciate a clue, I've been stuck for days!