Question: IN JAVA Design and implement an Abstract Data Type (ADT) for integer data type. For this ADT, it contains data of integer data type and
IN JAVA
Design and implement an Abstract Data Type (ADT) for integer data type. For this ADT, it contains data of integer data type and operations which operate upon these data. The data may be any integers whose range in (, ). The operations include (1) an encode function which converts from a decimal number (base 10) into a string of signed binary bits ( base 2, restricted to a signed 32 bits., i.e., 4 bytes long); (2) a decode function which converts from a string of signed binary bits to a decimal number; (3) an add function for summing two integers represented by two signed binary bits; (4) an subtract function for finding the difference between two integers represented by two signed binary bits; (5) a multiply function for finding the product of two integers represented by two signed binary bits; and (6) a divide function for finding the quotient of two integers represented by two signed binary bits . (This is an integer division!) (7) The addressing function for associating the name and the memory cell.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
