CSCI 151 - Lab 1
CodingBat
Overview
This week, you will use the website CodingBat to
learn Java syntax and structure.
Materials
Your are allowed to work with a
partner for this lab. If you work with a partner, be sure that you:
- Create a single, shared account (Step 1 below)
- Put both your names on the shared account
- Alternate who has the keyboard with each new problem.
Description
Step 1
Go to CodingBat and click on
"create account" in the top right. Use your Hendrix email as your
account id, and choose a password. Fill in your name. If creating a
joint account with a partner, fill in both your names. You must
fill in your name and/or your partner's name in order to get credit
for the lab.
Step 2
Important: you must do this step to get credit for the lab.
Once you are logged in, click on "prefs" in the top right. In the box
at the bottom labelled "Share To", fill in the Hendrix email address
of your lab instructor (goadrich@hendrix.edu), then click "Share".
This will allow your instructor to see your progress.
Step 3
Click on Warmup-1
in the Java section of CodingBat. Click
on sleep_in. Read the
description of the desired function behavior, and fill in a suitable
function definition.
Note that unfortunately, CodingBat does not like it if you use the Tab
key. You will have to use spaces to indent your code.
Once you have filled in a definition for the function, click "Go".
CodingBat will automatically run your function on a number of test
inputs and check whether it has the required behavior. If your
function passes all the tests, you will get a big green check mark,
and you can move on to the next problem. Otherwise, the failing tests
will be highlighted in red; fix your function and try again.
You should go on to complete five problems in Warmup-1.
Step 4
Continue to complete the problems described below in the grading section.
Academic Integrity
You must write the solutions by yourself, or with your partner if
working together. You may ask other students for advice, but remember
that
- You may not look at any other student's code.
- You may not show your code to any other students.
- You may not look at or copy any solutions you find on the
Internet. This includes solutions on the CodingBat site
itself.
Evidence of any of the above will be treated as a potential
violation of the Hendrix Academic Integrity Policy.
What to Hand In
You do not need to hand anything in. If you have shared your account
with your lab instructor as described in Step 2 above, your instructor
will be able to see your progress.
Grading
- To earn a D, complete five Warmup-1 problems.
- To earn a C, complete nine problems
in each of
- To earn a B, do the above and complete eight problems
in each of
- To earn an A, do the above and complete three problems
in each of
- To earn a 100, do the above and complete one problem
in
© Mark Goadrich, Hendrix College