aspose file tools*
The moose likes Java in General and the fly likes when to use abstract classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "when to use abstract classes " Watch "when to use abstract classes " New topic
Author

when to use abstract classes

gaurav gaur
Greenhorn

Joined: Jun 28, 2013
Posts: 1
Hello,
I am trying to develop a module for a bigger application. The module and application itself is quite simple. But they want me to use abstract classes in this.Please suggest some classes that can be made abstract for this application.
The application is :
An application for the employee salary distribution system needs to be made. An initial data base of 500 employees will suffice. It should contain the first name, last name, age, employee id, department, designation, salary and duration since first joined the company – as fields. An annual increment of 30% should be added to the existing salary. We should be able to see the salary of the employee on any date with proper increments. Once the age of the employee reaches 60 years, a notification should pop up on the system that it’s their retirement age and after 10 minutes of the notification pop up, the details of the employee should automatically move to a new data base; say ex- employees. Also on every 1st of the month, a notification should pop- up that salary needs to be distributed. We should be able to check all these functionalities by providing a date of our choice in the application. A proper graphical interface should be provided for this application.

I have started working on this. I used MVC for this and I also submitted a class diagram for this . But they want me to use abstract classes modularity. Please help me .. I have attached the basic class diagram.

this is what i have thought so far

Package Model;
ConnectionManager.java
public static Connection getConnetion(String DBName,String DBUserName,String DBPassword);

DataUpdate.java
public static bool insert(String[] fields);

public static bool update(String[] fields);

public static bool delete(string fields);


RetrieveData.java
public static String[] get(String[] fields);


Package Controller;
Salary.java
public static void checkDate(Date newDate);

private static void distribute_salary();

Retire.java
private static Date currentDate=new Date();

static void checkAge( Date newDate);

Increement.java
private static Date CurrentDate=new Date();

public static void checkDate(Date newDate);

private void updateSalary( Float Sal);

Main.java
public static void main(String[] args);


Package View;
Form.java
public static buildForm();

//events handlers for //GUI components which //contain calls to //functions in //controller

Popup.java
public void displayPopUp(String Text);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when to use abstract classes