CIM7A Assignments Will Posted First Week

 

Class will have up to 9 on-line programming assignments, labeled P0-P8. Each assignment is worth 10 points, pay attention to due dates on assignment handed in 2 weeks after due date are only worth 50%. During class discussion students should create an outline, algorithm or set of notes for solving program. Your assignments can be checked three ways:

  1. Preferrable during lab time on Tuesday
  2. You can hand in hard copies of the assignment before class starts.
  3. E-mail them to me but make sure your e-mail subject header has cim7a P1..P8, where P1..P8 represents the assignment you are sending me.


  Assignment
Tentative Due Date
p0

We will be doing this assignment in Class 2nd week: fill in questionnaire, log on to blackboard, take quiz 1 and also login to lab computers.

Install JDK-Java and Textpad at home, Help File.

Tuesday 2nd Week
P1

 

First write a program that prints hello your full name then,

Write a program that reads in two integers n1 and n2 and outputs...

  • Hello Your Full Name
  • value of n1 + value of n2 = n1+n2
  • value of n1 - value of n2 = n1 - n2
  • value of n1 * value of n2 = n1 * n2

Nota Bene, these three all produce different output, but only one is the best choice...

  1. System.out.println( "Sum n1+n2 = " + n1 + n2 );
  2. System.out.println( "Sum " + n1 + " + " + n2 + " = " + (n1+n2) );
  3. System.out.println( "Sum n1 + n2 " ); System.out.println( n1 + n2 );
Week 2 - 10/28/2008
P2

Novice Programmer

Write a program, that reads in a string (can have spaces), on a separate line output...

  • First Letter
  • First Word
  • String length
  • Print out an Upper Case Version of Your String
  • Find the First Occurrrence of a Vowel in Your String

Seasoned Programming...

Chapter 2 Page 125 Project 5 4th Edition - Page 117 Project 8 5th Edition,

Write a program that reads one complete line of text, find th first word in the line and move it to the end of the line.

Nota Bene Listed First is the 4th Edition page/project, second is the 5th edition page/project.

Week 4 11/18/2008
P3

Novice Programmer

Write a Program that Reads in a Temperature in Celsuisu and output the temperature in Kelvin and Fahrenheit.

Seasoned Programmer

Chapter 3 Page 217 Project 2 - Page116 Project 6

Assignment Modifications

Read in a floating pointing number and then a string/character C,F or K

Translate the given temperature to the other two temperatures.

So Given 0 C Output 0 Celsius 32 Fahrenheit 212 Kelvin

Hints Lots of Ways to do this program, an easy way to do this is...

initialize C,F and K to same termperature none of them can reach

get C from K; get C from F;
Using C get F, then K

Week 4 11/18/2008
P4

Chapter 3 4th edition Page 217 Project #4; Chapter 4 5th edition Page 231 Project #6;

Read exam grades 0..100; Display total number of A,B,C,D, and F; Negative input terminates data.

Week 4
P5

Chapter 4 4th Edition, Chapter 5 5th Edition- Defining Classes and Methods

Write a class called NumberInfo

it has one field number;

and these methods...

  1. doubleValue returns the double value of the number
  2. tripleValue returns triple value of the number
  3. abs returns absolute value of the number
  4. cubeValue returns the cube value of number
  5. readInput to read in the number
  6. writeOutput to write out the number, and all number info

 

 
P6

Chapter 6 5th Edition - More About Objects and Methods

Problem 2 Page 434 5th Edition
Problem 2 Page 413 4th Edition

Modify Species with five constructor: One for each instance variable, One for all three, One default null constructor

Write the three set Mutators

Also write the three get Accessors

week 7
P7

Arrays

Novice Programmer

Write a class that called Temperature

it has one field an array of seven temperatures.

Write the following methods

  • readInput read in the seven temperatures
  • writeOutput write out the seven temperatures, and also average, minimum and maximum temperature
  • average returns the average temperature
  • minimum returns the minimum temperature
  • maximum returns the maximum temperature
  • aboveAndBelow for each temperature prints out if it is above and/or below the average temperature

Seasonsed Programmer

Chapter 6 --- Page 498 Project 4; Chapter 7 5th Edition Page 530 Project 4
Add bubbleSort to arraySort
Also you quick Sort java.util.Arrays.sort

Use java.System.nanoTime to determine the time each takes each of the three sorting routines to sort the same list of a 10,000 random integers.

week 8
P7 is the last assignment for Fall/2008 CIM7A, you may want to do extra assignments on your own and/or redo the programming assignments without the help of others.
EC Extra Credit For October tictactoe, Will be discussing the tic tac toe code the second week in October. Battleship will be extra credit in CS4B; both Battleship and tictactoe use the same engine.