Question: Example outputs where the program has been provided with the correct arguments leading to a successful run of the program: Command: java cs 2 5

Example outputs where the program has been provided with the correct arguments leading
to a successful run of the program:
Command: java cs250.hw1.Operations 150b10110xfa
Output:
Task 1
Correct number of arguments given.
Task 2
15=Decimal
0b1011=Binary
0xfa=Hexadecimal
Task 3
15=true
0b1011=true
0xfa=true
Task 4
Start=15,Binary=0b1111,Decimal=15,Hexadecimal=0xf
Start=0b1011,Binary=0b1011,Decimal=11,Hexadecimal=0xb
Start=0xfa,Binary=0b11111010,Decimal=250,Hexadecimal=0xfa
Task 5
15=1111=>0000
0b1011=1011=>0100
0xfa=11111010=>00000101
Task 6
15=1111=>0001
0b1011=1011=>0101
0xfa=11111010=>00000110
Task 7
1111|1011|11111010=11111111
1111&1011&11111010=00001010
1111^1011^11111010=11111110
Task 8
11112=111100,1111>>2=11
10112=101100,1011>>2=10
111110102=1111101000,11111010>>2=111110
Deductions:
There is a 7.5-point deduction (i.e., you will have a zero on the assignment) if you:
(1) Build a GUI
Use of the following methods will result in a 100% deduction of the task points where used:
(1) Integer.parse
(2) Integer.toHexString
(3) Integer.toBinaryString
(4) Built in bitwise operations (~,^,|, &,,>>)
a. Note: Logical operations are allowed (!,||, &&, etc.)
A 100% deduction will occur from using any of the methods in this list (and all their overloaded
variants). Please note that 1) Integer.parse refers to Integer.parseInt. An additional set of overloaded
methods has been included to the deductions list from the Integer class: Integer.valueOf
These methods are illegal as they remove the need for students to perform parsing followed by
conversions
 Example outputs where the program has been provided with the correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!