Scientific Calculator: Synopsis

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Scientific Calculator

Synopsis

Arpit Verma
Admission No.: 17SCSE104049

School of Computing Science and Engineering


Greater Noida, Uttar Pradesh
Winter 2019-2020
ABSTRACT

At the beginning of the semester, Professor Dr. Avneesh kumar informed


his students that he had wiped the fifirmware on a Scientific Calculator.
Students were then assigned the daunting task of rebuilding the
software from the ground up.
Ding collaborated to complete this task along with the assistance of Pro
fessor R Karthick. The following report provides details about the
calculator
operated on, instructions on using the calculator, and an in depth look at
the
software written to complete the assignment.

Introduction

The following documentation focuses on the Scientific Calculator. Over


the course of the past semester we have rewritten basic fifirmware for the
complex
calculator. This process began with writing the software to read the
keyboard
for input, and display pressed keys on the LCD. Next we wrote the code
which
would allow users to enter and edit numbers. Finally, we wrote the code
which
would allow user to perform calculations using reverse Polish notation.
The contents of this document include a user guide, social implications,
hardware/software architectures, details of the software, our lessons
learned,
and criticisms of the course.

Overall description

A Scientific Calculator is a very powerful


and general purpose calculator. In addition to basic arithmetic functions,
it provides trigonometric functions, logarithms, powers, roots etc.
Therefore, these calculators are widely used in any situation where quick
access to certain mathematical functions is needed

Purpose

Java Scientific Calculator is a general-purpose scientific calculator that


you can use as a computer-desktop calculator or in a web application. In
addition to basic arithmetic functions it provides trigonometric functions,
logarithms, powers and roots, complex numbers, binary, octal, decimal
and hexadecimal calculations, logic, scientific notation, memory,
statistical funcions (mean, and population and sample standard
deviations), permutations and combinations. It also supports editing and
replay of input and copying of output to the (system) clipboard. You can
resize the application to one of three sizes and use the keyboard instead of
the mouse for all keys.

Java Scientific Calculator was originally designed as part of a web


application to show how you can use a calculator to calculate confidence
intervals. This is why it has statistical functions and behaves in a similar
way to pocket scientific calculators. At the time I could find no other
suitable calculator and I know of no other calculator that implements
statistical functions.
Problem Statement
Write a program that uses the java Math library and implement the
functionality of a scientific calculator. Your program should have the
following components:
1. A main menu listing all the functionality of the calculator.
2. Your program should use the switch structure to switch between
various options of the calculator. Your Program should also have the
provision to handle invalid option selection by the user.
3. Your calculator SHOULD HAVE the following functionalities. You
can add any other additional features. PLEASE MAKE SURE YOU USE
APPROPRIATE DATA TYPES.
a. Basic Functionality:
i. Add two numbers.
ii. Subtract two numbers.
iii. Divide a number by the second number (Don’t forget to check for the
divide by zero error).
iv. Multiply two numbers.
v. Remainder when a number is divided by the second.
b. Scientific Calculations:
i. Ceiling and Floor of a number.
ii. Sine, Cosine and Tangent of an angle given in radians.
iii. x2, x3 and xy (You can display exponents in your program as x^y).
iv. Square root of a non-negative number (add appropriate checks in your
program).
v. Logarithm of x base 10, natural logarithm of x base e and exponential
function ex
vi. Absolute value of a given number x.
c. Additional Features: a can be done by using simple arithmetic
operators. b can be done using the Math library of java. You have to write
code to add the following features to your calculator:
i. Calculate average of arbitrary positive numbers input by the user (Use a
loop and an appropriate sentinel value to achieve this task).
ii. Determine if a number is even or odd.
iii. Determine if one number is a multiple of the other.
iv. Factorial of a non-negative integer

You might also like