Post-2
- Review Modules 1 and 2.
- Complete Exercise 3 in Module 1. For this exercise, you will
see an assignment in Blackboard called Trial-Upload. The point
of this exercise is for you to see how to upload a
Java program into Blackboard.
- Type up the first primes program in Module 0, calling
the file
Primes.java,
and making sure that it
compiles and executes. You don't need to understand
the program, just be careful in typing it in correctly.
This will give you practice in reading syntax carefully.
Then, use the program to count the
number of primes less than N, for these values of
N: 100, 200, 300, ..., 1000. Of course, for each
different value of N, you'll need to edit the program,
compile, and execute. You'll use this to answer
a question set up in Blackboard (under assignments).
- Read sections 1.1, 1.2, and 1.3 of the textbook.
You can skim through the part about binary numbers
(we won't focus on that). But read the rest carefully.
- In class on Thursday, you wrote a program to
print out your initial. Now write a program called
MyInitials.java
that will, in similar fashion,
print out both your initials, as in:
\\\\\ """""
\ \ "
\\\\\ """""
\ \ "
\ \ """""
However, use only the backslash character in the first
initial and the double-quote character in the second initial.
Suggestion: first try writing it with
the * character as we did
in class. Then, after learning about escape
sequences from the textbook, change the program
to print out your initials with the backslash and
double-quote characters.
You will need to upload this program into Blackboard.
- Do the self-check exercises 16 and 17 on page 49
of the textbook.
- Don't forget your reflection exercise. In the future,
we'll assume that you will complete your reflection exercise
each week.
Submission: For this assignment, we'll use Blackboard
for submission. Go to assignments and then
to post-2.
Recommended, but not required:
- Read Chapter 1 of the Tao of Computing book.
- If interested, read more about primes
here:
http://primes.utm.edu/howmany.shtml.
- Find and watch a video, or read an article on how
computers work. It's worth knowing a little about
hardware, don't you think?
- Look up the Turing Award. What is given for?
Who was Alan Turing and why was he famous?