Lab 3: Programming in java

Assignment due on Thursday, May 29

In the previous lab, we have setup Eclipse, and written our first Java program that printed "Hello world" to the console screen. Today, we will build on our knowledge and experiment the concepts we learnt in class.

  1. Start Eclipse and open your previously created project. If you haven't created a project in the last class, you can see how to do it here
  2. Experiments with data types
  3. Experiments with operators
  4. Experiments with control statements
  5. Assignment(to do at home): Using precise English, and writing for someone who can do basic arithmetic, but who has no common sense at all, write an algorithm to make (monetary) change. Your algorithm should expect an input value that represents some amount of money in cents and give as output the number of quarters, dimes, nickels, and pennies that together represent the amount of money given as input. You should use as many large denomination coins as possible before using any coins of a smaller denomination. Example: given an input of "31" cents, the algorithm should return "1 quarter, 1 nickel, and 1 penny".

Save what you have done today in your P: drive (or H:). In this case, you can access your files from Webfiles at home(You will need the examples as a reference manual to finish your assignment).

Submission: Email me your lab3.java file before the class begins on Thursday