Homework 1

Choose one of the following problems for this assignment.

(i) how to register for a class at CCSF
(ii) how to write a paper on Charles Babbage and Ada Lovelace
(iii) make a cup of tea

For the problem you chose, using the format in section 1.6 to write the two algorithms as described below:

a) Algorithm#1: Use one level of numbering (just a sequential list of steps)

b) Algorithm#2: Use bulleted numbering with at least one extra level of stepwise refinement, that expands at least one of the major steps from part a. Use any editor (NotePad) or word processor (Word) to create and save a text file with your solution, then submit this text file.

Homework 1-B output a Haiku

With this assignment, as well as all programming assignments in general, you are required to submit one document that includes:

1. the program listing (the Unix cat command can do this)

2. the program output (Use the java command to do this) The submissions should not contain anything else such as

  • compiles (the javac command)
  • errors
  • outputs from other Unix commands

Do one of the following:

A) Write a Java program to output a Haiku. A Haiku is a three-line poem with 5, 7 and 5 syllables respectively. Note: I will not count syllables so any three lines will be fine (i.e. name/address/city state zip). I will grade on the following two requirements:

1. Print the first line of output using 2 print statements.

2. Print the second and third lines of output using a single print statement. You can use the code given in Unit 1-B (Hafiz) as a sample but you must make your own version.

B) Write a Java program to output your algorithm from part b in the first assignment. The program should have only one print statement. Use tabs (t) and new lines (n) to produce a stepwise indentation.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.