Please have the delivery date approached and the 50 mark of 100
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Write a Java program to develop an advance calculator with many
numbering systems. The program will support some services to allow the
user to convert from one system to another and make any arithmetic
operations with any system. Look at the following graph which demonstrates
the idea:
Number
String numb;
Void printInFormat( )
Binary
boolean check_B( )
int convertToDecimal( )
int SumTwoBinary(Binary
int SubTwoBinary(Binary
int MultiTwoBinary(Binary
int DivTwoBinary(Binary
Decimal
boolean check_D( )
int convertToBinary( )
int convertToOctal( )
int SumTwoDec(Decimal d)
int SubTwoDec(Decimal d)
int MultiTwoDec(Decimal d)
int DivTwoDec(Decimal d)
Octal
boolean check_Oc( )
int convertToDecimal( )
int SumTwoOctal(Octal c)
int SubTwoOctal(Octal c)
int MultiTwoOctal(Octal c)
int DivTwoOctal(Octal c)
Your program should do the following:
1. Your program will deal only with integer part of any number.
2. Write classes to simulate the above graph with described fields and
methods for each class:
• Number class is a super class consisting of a number itself and method to
write a number in specific format. For example, if numb = "123", the output will
be printed as "The result is ***123".
• Binary, Decimal and Octal classes have some methods that describe
specific system. For example, the " convertToDecimal( ) " method in binary
class will convert the binary number to decimal and return it as an integer. The
methods of summation, subtraction, multiplication and division will take two
binary operators and return binary number. Each class will deal with its type.
• The methods "check" will check if your number is as expected that if your
object is binary, the input number must be in binary format that consists only from
0 or 1 and if it is not, the number will be returned to enter again. Each class will
deal with its type.
Faculty of EIT Java Project
Number
String numb;
Void printInFormat( )
Binary
boolean check_B( )
int convertToDecimal( )
int SumTwoBinary(Binary
int SubTwoBinary(Binary
int MultiTwoBinary(Binary
int DivTwoBinary(Binary
Decimal
boolean check_D( )
int convertToBinary( )
int convertToOctal( )
int SumTwoDec(Decimal d)
int SubTwoDec(Decimal d)
int MultiTwoDec(Decimal d)
int DivTwoDec(Decimal d)
Octal
boolean check_Oc( )
int convertToDecimal( )
int SumTwoOctal(Octal c)
int SubTwoOctal(Octal c)
int MultiTwoOctal(Octal c)
int DivTwoOctal(Octal c)
2
3. In main class, you must develop a scientific calculator as the following
output:
Welcome to scientific calculator….enjoyed with it.
Scientific calculator's Main Menu……….
************************************************************
1. Decimal 2. Binary 3. Octal 4. Conversions 5. Quit
************************************************************
CHOOSE YOUR SYSTEM: 2
A) Add two binary
S) Subtract two binary
M) Multiple two binary
D) Divide two binary
Enter your formula:
## A 101 11
The result is ***1000
Enter your formula:
## B
Finished section…………….
************************************************************
1. Decimal 2. Binary 3. Octal 4. Conversions 5. Quit
************************************************************
CHOOSE YOUR SYSTEM: 4
This section is designed to convert from one system to another…..
1-Decimal to Binary 3-Decimal to Octal 5-Binary to Octal
2-Binary to Decimal 4-Octal to Decimal 6-Octal to Decimal
************************************************************
7-Back to Main
**************
ENTER YOUR CHOICE: 1
Write number to convert: 98
The result is ***1100010
ENTER YOUR CHOICE: 5
Write number to convert: 123
Be attention!!!!! Your number must be in binary format.
ENTER YOUR CHOICE: 5
Write number to convert: 11
The result is ***3
ENTER YOUR CHOICE: 7
Finished section…………….
************************************************************
1. Decimal 2. Binary 3. Octal 4. Conversions 5. Quit
************************************************************
CHOOSE YOUR SYSTEM: 5
Thank you for using our system…..
3
4. Finally, print an error message if any of your choice is incorrect and try
again.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Start a new topic
Add Reply




MultiQuote




| 


