Lab 10: Itecalculator: Numbersystemconversion Numbersystem Numbersystemconversion
Lab 10: Itecalculator: Numbersystemconversion Numbersystem Numbersystemconversion
ទ ំ ពន េញ Java Programming
មហាវ ិទ្យយល័យវ ិស្វកមម ពោកគ្រូ៖ ពោ ស្ុខជា
ឆ្នំទ្យី២ ឆមាស្ទ្យី១ Lab 10
B. Create a new class named NumberSystem. This class will be used as a super
class. Please shift some code from your old class NumberSystemConversion to this
new class. You can add new fields and methods to this new class. Note: because
it is a base class, you should add fields and methods that can serve for all child
classes.
C. Create a new class named Binary and inherit from NumberSystem class. In this
class, it will handle all conversion from Binary to Octal, Decimal, and Hexadecimal.
D. Create a new class named Octal and inherit from NumberSystem class. In this
class, it will handle all conversion from Octal to Binary, Decimal, and Hexadecimal.
E. Create a new class named Decimal and inherit from NumberSystem class. In this
class, it will handle all conversion from Decimal to Binary, Octal, and Hexadecimal.
F. Create a new class named Hexadecimal and inherit from NumberSystem class. In
this class, it will handle all conversion from Hexadecimal to Binary, Octal, and
Decimal.
Note: You can shift your code that you wrote in lab 5, 6, 7 to the corresponding new classes
you created.