Challenge

Project

Scientific Calculator

In the package History the calculation is saved under CalculationsHistory.txt.

In the package Inputs there are two classes MInput.java and SInput.java where two or more variables can in inputted through MInput file and a single input can be put through SInput file.

In the package Operations the files consisting of many operations to be performed are included such as, b2d, d2b, Basic, NthRoot, Sipcal, Scientific, Storage.

The scientific calculator project consists of basic and advanced calculations. The basic operations include addition, subtraction, division, multiplication, power of and so on. While the advanced operations include finding the value of cos, sin, tan, Itan, Icos, Isin and so on. The project also includes the operation of SIP to calculate compounding investments. The project consists of class Calculator from where the main method is executed, User is provided with userOptions method to select the operation required after selection of operation calculator is begun. The calculator can be ended with the help of endCalculator method.

The project uses Object oriented programming concepts such as polymorphism, Inheritance, Abstraction, methods, classes, objects, the relationships like Is-a relationship etc.

Some of the OOPs concepts used in the software are as follows:

Object: An object can be classified as an instance of a class, and a program can contain multiple instances of a class. In the software an object is instantiated as per given statement.

SInput input = new SInput();

Class: One of the fundamental concepts of OOPs is the class, which is a group of related entities. It is a logical component, not a physical entity. Some of the classes for example from the software are public class SInput, public class MInput, public class Save Calculation.

Association: In the software for example SaveCalculation and Nth Root class are associated with each other having IS-A relationship. It also represents the Inheritance. By using the logCalculations method calculations are saved inside a txt file.

Inheritance: The IS-A relationship, also known as a parent-child relationship, is represented by inheritance.

The extends keyword in Java indicates that a new class is derived from the base class through inheritance. In other words, the extends keyword is used to extend the functionality of the class. For example, from the software public class b2d extends SaveCalculation {} represents the inheritance concept Here the class b2d is extending SaveCalculation class.

Polymorphism: Polymorphism is the ability to perform a specific action in multiple ways. Polymorphism in Java can take two forms: method overloading and method overriding. For example:

This method public void recall() throws IOException can be called in the class Calculator , Where as it is defined at the Storage class.

Abstraction: Conceals complexity of the data and aids in the avoidance of repetitive code

Only the signature of internal functionality is shown.

For example, from the software is abstract class Calculator{}.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.