Computer Science, asked by puneetdh7890, 1 month ago

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 Anonymous
0

Answer:

come here girls

Explanation:

cev-skrc-pbm. come here 9 th 10th girls for studies

Similar questions