Version 9 (modified by 9 years ago) (diff) | ,
---|
Programming Prompts
Feel to add good prompts into this list as you find them. This will greatly help future software team leads and new programmers.
The prompts are written with Java in mind, but can be adapted to most languages. The downloadable test scripts are run with Java, require the main class name to be the name of the prompt, and use the default package.
Note: To use the starter code and test scripts at the bottom of the page, download them to the directory of your choice, then in Eclipse, right-click in the Project Explorer, click Import..., and in the dialog box, select General --> Existing Projects into Workspace. Select the directory you saved the unzipped file into for the root directory, and select all projects there.
Checkerboard
Write a static method that takes two int parameters m
and n
and returns a checkerboard-patterned two-dimensional boolean array that is m-by-n
in size. Any given checkerboard square on a checkerboard has no adjacent squares with the same color (boolean value).
Test Scripts
Attachments (5)
-
Sort3.zip (4.4 KB) - added by 9 years ago.
starter code and test script for Sort3
-
Checksum.zip (4.8 KB) - added by 9 years ago.
starter code and test script for Checksum
-
CheckerboardTest.java (4.5 KB) - added by 9 years ago.
Alternate test code for checkerboard if you are generating the correct arrays but the test fails.
-
Checkerboard.zip (5.5 KB) - added by 9 years ago.
starter code and test script for Checkerboard
-
CodeBreaker.zip (19.5 KB) - added by 9 years ago.
starter code and test script for CodeBreaker
Download all attachments as: .zip