Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 14 Introduction to Programming Mr. Joshua Stough February 21, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218.

Similar presentations


Presentation on theme: "COMP 14 Introduction to Programming Mr. Joshua Stough February 21, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218."— Presentation transcript:

1 COMP 14 Introduction to Programming Mr. Joshua Stough February 21, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218

2 Announcements Added Office Hour –Tian - now 2-6pm Tuesday Program 3 due Wednesday –start now if you haven't already!

3 Program 3 You aren't responsible for handling any exceptions that might occur due to user input If you accept only uppercase (or only lowercase) characters make sure the user knows that Test your program –make sure the computer eventually chooses all of the shapes

4 Mid-Term Exam Wednesday, March 3 –if you're not going to be here, you should tell me this week (make-up exam will be different) 150 points Chapters 1-5 Format: –10 true/false (4 points each) –20 multiple choice (4 points each) –2 programming (15 points each) We'll go over a previous exam and look at sample questions next Monday

5 Next Time in COMP 14 Object-Oriented Design Read: Ch 6 (pgs. 298-307) –you don't need to understand anything about JLabel, JButton, etc. Mini-Review –String methods –booleans –anything else? send me email by noon Tuesday

6 Lab 5.5 - 3 a,b pgs. 118-119 (If you didn't finish this Friday) Use nested for loops to print the following table: ABCDE112345212345312345412345512345ABCDE112345212345312345412345512345

7 Lab 5.1 - 2 a,b pgs. 90-91 Simulate order processing at a hardware store Allow user to enter item name and price Print item and price to a file called invoice1.dat Sentinel value for item is 999 Sentinel-controlled while loop hammer 9.95 saw 20.15 shovel 35.40

8 Lab 5.1 - 3 a,b pgs. 92-93 Ask user for an item using a GUI (UsingGUI.java) Look in invoice1.dat for the item If the item is found, output the price –doesn't have to be formatted to 2 decimal places If the item is not found, tell the user EOF-controlled and flag-controlled while loop

9 Ch 5 - 8 a,b,c pg. 261 Write a program called WhileLoops.java that uses while loops to: –prompt the user to input two integers (make sure that 2nd integer > 1st integer) –print all the odd numbers between 1st integer and 2nd integer –print the sum of the even numbers between 1st integer and 2nd integer

10 Ch 5 - 9 b,c pg. 261 Copy WhileLoops.java to ForLoops.java –don't forget to change the class name Redo parts b and c using for loops instead of while loops

11 Programming Session 1. lab 5.5 - 3 a,b (pgs. 118-120) 2. lab 5.1 - 2 a,b (pgs. 90-91) 3. lab 5.1 - 3 a,b (pgs. 92-93) 4. programming exercise 8 a,b,c (pg. 261 in textbook) 5. programming exercise 9 b,c (pg. 261)


Download ppt "COMP 14 Introduction to Programming Mr. Joshua Stough February 21, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218."

Similar presentations


Ads by Google