Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objective: Using Java Eclipse Write a program that accepts two four - digit binary numbers, converts them to decimal values, adds them together, and prints
Objective: Using Java Eclipse
Write a program that accepts two fourdigit binary numbers, converts them to decimal values, adds them together, and prints both the decimal values and the result of the addition.
Requirements:
Functionality. pts
No Syntax, Major RunTime, or Major Logic Errors. pts
Code that cannot be compiled due to syntax errors is nonfunctional code and will receive no points for this entire section.
Code that cannot be executed or tested due to major runtime or logic errors is nonfunctional code and will receive no points for this entire section.
Clear and EasyToUse Interface. pts
Users should easily understand what the program does and how to use it
Users should be prompted for input and should be able to enter data easily.
Users should be presented with output after major functions, operations, or calculations.
All the above must apply for full credit.
Users must be able to enter a bit binary number in some way. pts
No error checking is needed here and you may assume that users will only enter s and s and they will only enter bits.
Binary to Decimal Conversion pts
You may assume that users will only give numbers that add up to
See the section Hint for more details.
Adding Values pts
Both decimal values must be added together and printed out.
You may NOT use Integer.parseInt or any automatic converter pts
The use of specifically Integer.parseInt will result in a for this entire section.
You may use Integer.parseInt
Coding Style. pts
Readable Code
Meaningful identifiers for data and methods.
Proper indentation that clearly identifies statements within the body of a class, a method, a branching statement, a loop statement, etc.
All the above must apply for full credit.
Comments. pts
Your name in the file. pts
At least meaningful comments in addition to your name. These must describe the function of the code it is near. pts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started