Beruflich Dokumente
Kultur Dokumente
1. Introduction .................................................................................................................. 1
5. Testing ....................................................................................................................... 22
7. Conclusion ................................................................................................................. 44
Appendix ........................................................................................................................ 45
Table of tables
1. Introduction
The aim of this project is to develop the software based on java programming for the
institution which hire the developer for the particular institution. In this project, a class to
represent a Developer together with two sub classes to represent Senior and a Junior
developer has created respectively.
This software is basically used in organization which helps the institution to hire the
developer which displays the detailed information of the developer. This system is a
computerized system which reduces the loss of records files of hired developers which
basically happens on non-computerized system. The software mainly focuses on record
the information of developer like interviewer name, developer name, advance salary,
working hours, and contract period.
2. Class Diagram
1
CS4001NT programming
- interviewerName: String
- developerName: String
- workingHours: int
+ getplatform(): String
+ getInterviewerName(): String
+ getDeveloperName(): String
+ getWorkingHours(): int
+ display(): void
2
CS4001NT programming
Senior Developer
- salary(): int
- joiningDate(): String
- staffRoomNumber(): String
- contractPeroid(): int
- advanceSalary(): double
- appointed(): boolean
- terminated(): boolean
3
CS4001NT programming
- salary(): int
- appointedDate(): String
- evaluationPeriod(): String
- terminationDate(): String
- specialization(): String
- appointedBy(): String
- joined(): boolean
4
CS4001NT programming
Relation of inheritance
5
CS4001NT programming
6
CS4001NT programming
3. Pseudo code
END DO
DEFINE display()
DO
DISPLAY platform
DISPLAY interviewerName
DISPLAY workingHours
IF developerName is not equal to “ ”
DO
DISPLAY developerName
END IF
END DO
8
CS4001NT programming
9
CS4001NT programming
10
CS4001NT programming
DISPLAY sorry the developer has already been appointed with staff
room number END DO
ELSE
DO
CALL is made to super class to INITIALLIZE
INITIALLIZE this.staffRoomNumber to ‘String’ staffRoomNumber
INITIALIZE this.joiningDate to ‘String’ joiningDate
INITIALLIZE this.advanceSalary to ‘double’ advanceSalary
INITIALLIZE appointed to ‘boolean’ TRUE
INITIALLIZE terminated to ‘boolean’ FALSE
END DO
END IF
END DO
11
CS4001NT programming
DEFINE developerDetails ()
DO
DISPLAY platform
DISPLAY Interviewer Name
DISPLAY Salary
END DO
DEFINE display()
DO
CALL display method from parent class
DO
IF appointed is equal to ‘TRUE’
INITIALIZE terminated is equal to ‘FALSE’
DO
DISPLAY joining date
DISPLAY Advance Salary
DISPLAY Developer Name
END DO
END IF
END DO
END DO
12
CS4001NT programming
13
CS4001NT programming
END DO
14
CS4001NT programming
15
CS4001NT programming
DEFINE display()
DO
CALL super.display() from parent class
IF joined is equal to ‘TRUE’
DO
DISPLAY Appointed date is
DISPLAY Developer
DISPLAY Evaluation period is
DISPLAY Termination date is
DISPLAY Developer salary
DISPLAY Developer is specialized in
DISPLAY Developer is appointed by
END DO
END IF
END DO
16
CS4001NT programming
4. Methods Description
4.1 Developer (Parent Class)
• getPlatform
This method is used to extract value from the instance variable ‘platform’ and return the
value.
• getInterviewerName()
This method is used to extract the value from instance variable
‘interviewerName’ and return the value.
• getDeveloperName()
This method is used to extract the value from instance variable ‘developerName’ and
return the value.
• getWorkinngHours()
This method is used to extract the value from the instance variable
17
CS4001NT programming
• Display()
This method is used to display the
• getSalary()
This method is used to extract the value from the instance variable ‘salary’ and return
the value
• getJoiningDate()
This method is used to extract the value from the instance variable ‘joiningDate’ and
return the value.
• getStaffRoomNumber()
This method is used to extract the value from the instance variable
‘staffRoomNumber’ and return the value.
• getContractPeriod()
18
CS4001NT programming
This method is used to extract the value from the instance variable ‘contractPeriod’
and return the value.
• getAppointed()
This method is used to extract the value from the instance variable ‘appointed’ and
return the value.
• getTerminated()
This method is used to extract the value from the instance variable ‘terminated’ and
return the value.
• getAdvanceSalary()
This method is used to extract the value from the instance variable ‘advanceSalary’
and return the value.
• setSalary()
This is the method to set the salary to the instance variable ‘salary’
• setContractPeriod()
This is the method to set the contract period to the instance variable
‘contractPeriod’
• hireDeveloper()
This is the method to set the value on parameter String newSalary, String joiningDate,
double advanceSalary, String staffRoomNumber.
• terminateDeveloper()
This is the method to accept the value on parameter as String developerName.
• developerDetails(): void
19
CS4001NT programming
• display(): void
This is the method to display the information about joiningDate, advanceSalary, and
developer.
getSalary()
This is the method to extract the value from the instance variable ‘salary’ and return the value.
getAppointedDate()
This method is used to extract the value from the instance variable ‘appointedDate’ and return
the value.
getEvaluationPeriod()
20
CS4001NT programming
This method is used to extract the value from the instance variable ‘evaluationPeriod’ and
return the value.
getSpecialization()
This is the method to extract the value from the instance variable ‘specialization’ and return the
value.
getAppointedBy()
This is the method to extract the value from the instance variable ‘appointedBy’ and return
the value.
getJoined()
This method is used to extract the value from the instance variable ‘joined’ and return
the value. getterminationDate()
This method is used to extract the value from the instance variable ‘terminationDate’ and
This method is used to set the salary to the instance variable ‘salary’ appointDeveloper(): void
This is the method to appoint the developer with developername, appointedDate,
terminationDate, specialization.
display()
This is the method to display the details of junior developer.
21
CS4001NT programming
5. Testing
5.1 Test 1
22
CS4001NT programming
23
CS4001NT programming
24
CS4001NT programming
25
CS4001NT programming
5.2 Test 2
26
CS4001NT programming
27
CS4001NT programming
28
CS4001NT programming
29
CS4001NT programming
5.3 Test 3
30
CS4001NT programming
platform = “IOS”
interviewerName = “Ankit”
workingHours = 12 salary =
1399 appointedBy = “Nikhil S”
terminationDate = “01/04/2018”
31
CS4001NT programming
32
CS4001NT programming
33
CS4001NT programming
5.4 Test 4
platform = “IOS”
interviewerName =
“Ankit” workingHours =
12 salary = 1399
appointedBy = “Nikhil S” terminationDate
= “01/04/2018”
Inspected object of JuniorDeveloper Class appointDeveloper
method is called with following arguments to display the
output.
34
CS4001NT programming
35
CS4001NT programming
36
CS4001NT programming
37
CS4001NT programming
38
CS4001NT programming
39
CS4001NT programming
40
CS4001NT programming
6. Errors
41
CS4001NT programming
42
CS4001NT programming
Figure 22 Correction of semantic error writing variable’ interviewer name’ in camel case
43
CS4001NT programming
7. Conclusion
The module of this project is all about developing a software based on java programming
language. Java is an object oriented and multi-platform computer programming language
which convert human readable language into machine language. This project is done by
using Bluej. Bluej is an integrated development environment for java basically designed
for beginners.
This estimation is about fabricating software based on java programming for the
institution. In this project, a file is created in Bluej representing a Developer class together
with two sub classes to represent Senior and a Junior developer respectively.
44
CS4001NT programming
Appendix
Developer class
/**
* This is first coursework of programming.
* Here, we have developer class which have two sub classes Senior and Junior Developer
* Code done by Ankit Adhikari
*/
public class Developer
{
/**
45
CS4001NT programming
/**
46
CS4001NT programming
* Here, we are initiallizing the attributes in the constructor assigning the value of constructor's
parameters
*/
public Developer(String platform, String interviewerName, int workingHours)
{
this.platform= platform; this.interviewerName=
interviewerName; this.workingHours= workingHours;
developerName= ""; // set developer name as empty string
}
/**
* Here, we are defining method to set the developer name
*/
public void setDeveloperName(String developerName)
{
this.developerName= developerName;
}
/**
* Now, we are making display method and displaying the output
*/
public void display()
{
System.out.println("Platform:" + platform);
System.out.println("Interviewer:" +interviewerName);
System.out.println("Workinng Hours:" +workingHours); if(developerName!=(""))
System.out.println("Developer Name:" +getDeveloperName());
}
}
47
CS4001NT programming
48
CS4001NT programming
/**
* Now we are making accessor method for each attributes
*/
private int salary;
public int getSalary()
{
return salary;
}
49
CS4001NT programming
return advanceSalary;
}
/**
* initiallizing the attributes in the constructor assigning the value of constructor's parameters
*/
public SeniorDeveloper (String platform, String interviewerName, int workingHours, int
salary, int contractPeriod)
{
super (platform,interviewerName,workingHours); // call is made to parent class
this.salary= salary; this.contractPeriod= contractPeriod;
50
CS4001NT programming
51
CS4001NT programming
52
CS4001NT programming
53
CS4001NT programming
54
CS4001NT programming
}
else {
55
CS4001NT programming
/**
* initiallizing the attributes in the constructor assigning the value of constructor's parameters
*/
56
CS4001NT programming
{
if(joined==false)
{
super.setDeveloperName(developerName); // call is made to parent class
// updating appointed date, termination date and specialization
this.appointedDate=appointedDate;
this.terminationDate=terminationDate;
this.specialization=specialization; joined=true; // assign joined
status to true
}
else
{
System.out.println("developer is already appointed and date is"+appointedDate);
}
}
57
CS4001NT programming
}
}
}
58