Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago