Classes Or Interface Section:
-----------------------------------------------------------------------------------------------------------------------In JAVA application, the main intention of classes and interfaces is to represent real world entities in the form of coding part.
EX: student, Employee, Customer, Account, Product...
Note: In JAVA application Entities data will be represented in the form of variables and entity behavior are represented in the form of methods.
EX:
public class Account // Entity
{
// Entities Data in the form of variables
public String acc_No;
public String acc_name;
public String acc_Type;
public long balance;
----------
----------
// Entity behaviors in the form of methods.
public void create(String acc_No, String acc_name, String acc_Type, long balance)
{
}
public void update(String acc_No, String acc_name, String acc_Type)
{
}
public void delete(String acc_No)
{
}
}
Note: In JAVA Application , we can write any no of classes and interfaces as per the application requirement.
No comments:
Post a Comment