Project
In the followed application I have done according to the principles and OOPs concepts.
I have made it as a single class calculations having all the methods as asingle unit which is calledd as the Encapsulation.
In the methods i have used some Abstract methods from the Math.
ex: Math.log10(num1)
Math.log(num1)
log10() and log() methods are Abstract methods i have used .
In some mehods we have used the try and catch blocks which are ment for the handling the exceptions.
ex: try {
FileOutputStream fout = new FileOutputStream("calculationsHistory.txt");
ObjectOutputStream out = new ObjectOutputStream(fout);
out.writeObject(calc);
out.flush();
out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
IoException i have used in the above method is not a parent class which is extending from the Exception class which is parent class of all the exceptions.
this exteding from the Exception class is an example of the inheritence.