JAVA MATRIX QUESTION

Oct 25th, 2014
Steve1995
Category:
Programming
Price: $60 USD

Question description

Nine coins are placed in a 3x3 matrix with some face up and some face down. You can represent the state of the coins using a 3x3 matrix withvalues  0 (heads) and 1 (tails). Here are some examples:

0 0 0 1 0 1 1 1 0
0 1 0 0 0 1 1 0 0
0 0 0 1 0 0 0 0 1

Each state can also be represented using a binary number. For example, the preceding matrices correspond to the numbers:

000010000 101001100 110100001

There are a total of 512 possibilities, so you can use decimal numbers 0, 1, 2, 3,...,511 to represent all the states of the matrix. 

Write a program  that prompts the user to enter a number between  0 and 511 and displays the corresponding matrix with the characters  H and T.

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Rice University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
pmallory
Dec 6th, 2016
" Totally impressed with results!! :-) "
mixedballz
Nov 27th, 2016
" excellent work as always thanks for the help "
Five Star Tutor
Nov 24th, 2016
" Outstanding Job!!!! "
kiln82
Nov 14th, 2016
" awesome work thanks "
darnay
Nov 5th, 2016
" The best tutor out there!!!! "
likeplum4
Oct 31st, 2016
" Excellent work as usual "
kpcutie
Oct 9th, 2016
" Excellent job "
Joemoe
Sep 30th, 2016
" <3 it, thanks for saving me time. "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1826 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors