In blue j
Create a class with the following functions:
(i) boolean isBinary() which accepts a binary number as parameter and return true if it is a valid binary number or not. A binary number consists of only two digits 0 and 1. (ii) int binToDecimal(int b) which accepts a binary number as parameter and return its
decimal equivalent.
(iii) int deciToBinary(int d) which accepts a decimal number as parameter and return its binary equivalent.
(iv) void sum() where you input two binary numbers and if they are valid binary numbers
find their sum. Sample input and output when the sum() function is executed:
INPUT Enter two valid binary numbers: 1011 11011
OUTPUT Sum of the two given binary numbers is: 100110
Answers
Answered by
0
Answer:
come here girls
Explanation:
cev-skrc-pbm. come here 9 th 10th girls for studies
Similar questions
Political Science,
17 days ago
English,
17 days ago
India Languages,
1 month ago
Science,
1 month ago
Math,
9 months ago