Introduction to Programming, Dr. Kay

Tentative Schedule Spring 2009(Section 2  TR 12:15)

This schedule is tentative. I will update it during the semester to reflect how the class has been advancing. I will not always cover the problems that are listed under “Topic,” but I’ve created this schedule so you have an idea of what I’ll probably cover.

Unless specifically noted, lab assignments will not be collected. However, you are expected to complete them in order to be prepared for the Tuesday quizzes. If you have questions about the assignments, the time to ask them is BEFORE class starts on Tuesday. We will start quizzes pretty promptly at 12:15.

Sometimes quizzes will use parts of the assignments that you did as lab problems the week before. You should bring your solutions to the lab problems with you to lab on a flash drive, or have them saved to your H drive (ideally, do both). Bring your textbook with you to class – you will need it for class and also for open-book quizzes.

Readings are listed on the days I give the relevant lecture. You must have completed the reading before the following lecture (so, for example, by January 27th, you must have read sections 3.1 & 3.2 in the text book, which we covered in class on January 22nd)

 


W

E

E

K


M

O

N

T

H

Tuesday (Lab – Robinson 312)

Thursday (Lecture – Robinson 324)

Date

Lab Problems to prepare for next week’s quiz

 

NOTE: QUIZ EVERY TUESDAY!!!

Here's everything that's due today (besides the lab problems from the previous week)

Date

Topic

Here's everything that's due today

1




J

A

N

U

A

R

Y

 

20

 

Page 55, #8, 12, 14, 20, 24, 26, 30

Take the on-line sample quiz soon (really easy, and recommended, not required)

 

22

VB Objects & Events (3.1-3.2)

 

We will do together:

Page 69: #37, Page 70: #46 (with disappearing box modification)

Required assignment for points: Attach a photo of yourself to a 3x5 4x6 card. On the other side of the card, clearly print your full name and what you'd like me to call you in class.

 

You lose points if you do not follow these (simple) instructions carefully!

 

Don’t leave your first lab until the last minute!! Remember there’s a quiz on Tuesday.

2



27


NOTE: Today's quiz postponed to Thursday!!

Page 69, #38, 39; Page 70 #42, 44, 47


Read 3.1



29

Reminder: Quiz today!!!

Numbers (3.3)

 

We will do together: even numbered problems from pages 79-81,

 

Page 82: #45 & 47

If we have time, we'll do page 83 #58

Page 134 #121 (we’ll also use mod to say how many tickets leftover)

We’ll also write a program to convert from cups to quarts using mod



Read 3.2

3

F

E

B

R

U

A

R

Y

3

 

Do the following from “exercises 3.3” on paper to make sure you understand section 3.3 (note: answers are in the back of the book)

Page 79 #1, 5;

Page 80 #7, 9, 11, 13, 15, 17, 19, 21;

Page 81 #33, 35, 37

 

Do the following on the computer:

Page 82 #46

Page 83 #53,55,57

Page 134 #122 (Say how many candies are leftover using mod!) and #124



Read 3.3

5

Strings (3.4) (We will do the following sections (skip everything else):

·         Variables & Strings

·         Concatenation

·         Declaring Variable Types

·         Named Constants

·         Using Text Boxes for I/O

 

Input and output (3.5)
(We will do the following sections (skip everything else):

·         Reading data from files,

·         Input from an input dialog box,

·         Using Message Dialog Box for output,

·         Program Documentation

 

 

We will do together:

·         Page 96#28 (using constants, and textboxes for I/O)

·         Read the names of a student and their 4 quiz grades from a file;

·        

page 118#54

Page 134 #121 (we’ll also use mod to say how many tickets leftover)

On-line quiz 1 due at midnight tonight.


4

10

Do the following from “exercises 3.4” on paper to make sure you understand section 3.4 (note: answers are in the back of the book)

 

Page 94 #1, 3, 5, 7,

 

Page 96 #27

Page 97 #30 (The percent of games that you’ve won is the number of games you won, divided by the total number of games, and then multiplied by 100)

Write a program that reads the names and ages of 3 kids from a file. You may assume that the kids are all between 2 and 16 years old. Print out a message to each kid (so there will be 3 messages) that tells them how long before they will be old enough to drive in NJ, where the driving age is 17.

Read 3.4 & 3.5 (see Feb 5th for info on which sections to read and which to skip!)

12

Built-In Functions (3.6)

We will do together:

·         Write a program to read in a date in the form mm-dd-yyyy and print it out nicely

·         Find out if one word contains another (we’ll get the words from pop-up dialog boxes and give our output using a popup as well as printing in a picturebox

·         Compute a tip and format nicely

·         Roll a pair of dice and see what (random) numbers you get

Page 134 #121 (we’ll also use mod to say how many tickets leftover)

On-line quiz 2 due at midnight tonight


5

17

Do the following from “exercises 3.6” on paper to make sure you understand section 3.6 (note: answers are in the back of the book)

 

Page 129: All odd problems #1-19

Page 130: All odd problems #21-39

 

Do the following on the computer:

 

Page 135 #126; Page 135 #130

also do Page 136 #134

Read 3.6




19

Sub Procedures (4.1)

Sub Procedures (4.2)

 

We will do together:

Page 141: Programming Project #8

Page 175 #10, 12

6

24

Do the following from “exercises 4.1” on paper to make sure you understand section 4.1 (note: answers are in the back of the book)

 

For all of these problems you are supposed to determine the output displayed in the picture box when the command button is clicked:

·         Page 154 #3

·         Page 155 #7, 9

·         Page 156 #11, 13

·         Page 157 #17, 19

·         Page 160 #31, 33

 

Do the following on the computer:

·         Page 164 #52

·         Page 163 #44 (note: HowLong should have an argument!)

26

Function Procedures (4.3)

 

We will do together:

·         Page 193 #17, 19, 21

·         Page 190 #6

·         Page 191 #8

·         Page 141: Programming Project #8 (Modify our previous one so that it uses functions to compute change)

 



7

 

 

 

M

A

R

C

H

3

Do the following from “exercises 4.3” on paper to make sure you understand section 4.3 (note: answers are in the back of the book)

 

·         Page 190 #5,7

·         Page 191 #9

 

Do the following on the computer:

·         Page 192 #13, 16

 

5

Modular Design (4.4)

 

Catch up time

 

8

10

More Practice: Old Midterm Problems

12

If blocks (5.1 & 5.2)

9

17

SPRING BREAK

19

SPRING BREAK

10

24

Finish up: Old Midterm Problems

review quiz

26

More on If blocks

On Line Quiz 3 due today at Midnight.

11

31

Page 222 #28,30. Page 223 #36,37

 

2

More on If blocks

 

Select Case (5.3)

12

A

P

R

I

L

7



For each of the following problems, solve them first using a select case statement. Then do it again using ifs (and if elses and if elseifs)
  • Page 239 # 27
  • Page 239 # 28 (remember that the order of your choices in the case-select or if is important -- it always picks the first it matches. This can help you if you do the 700 to 750 before the upper floor stuff.)
  • Page 240 #31
  • Page 240 #32

 

9

Intro to Loops

On Line Quiz 4 due today at Midnight.

13

14

  • Write a program that asks the user for an integer between 1 & 12 inclusive. If they give you a number that's not between 1 & 12 inclusive, then keep asking them until they do give you a valid number. Once you get a valid number, say thank you and print that number on the screen.
  • Redo the program above, changing the end -- instead of printing the number on the screen, use a loop to print out a multiplication table for that number (e.g., if the nuber were 3, your program would print:
    1 * 3 = 3
    2 * 3 = 6
    3 * 3 = 9
    <keep going ....>
    11 * 3 = 33
    12 * 3 = 36
    . Since you know you're going to do this exactly 12 times, you know what kind of loop to use, right?

  • Write a program that asks the user for a positive integer. Your program should use a loop to keep asking them to reenter the number if the number they enter isn't positive (sound familiar?) (you may assume that they will only type integers, though they may type negative ones unless you error check). Once you have a positive integer, print out that many copies of your name on the screen (what type of loop should you use to do this?)


  • Write a program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity. The program should assume that the room can hold 100 people, and will ask the user to enter the number of people to attend the meeting. (It should be a positive int, you should verify this, and if it's not keep asking the user to re-enter the numbers until it is). If the number of people is less than or equal to the maximum room capacity (i.e. 100), the program announces that it is legal to hold the meeting (and if there is room for more people, it also announces how many additional people may join the meeting.) If the number of people exceeds the maximum room capacity, the program announces that the meeting cannot be held due to fire regulations, and tells how many people must be excluded in order to meet fire regulations.

  • If you didn't do it already, fix the problem above so that the grammar is correct (i.e. plurals are only used when necessary)

  • Page 265 # 26 (Hint: make your loop do the hard work. Starting at 1,print the square of 1, then of 2, then of 3 and so on. loop as long as the square of your number isn't too big -- if you don't know how many times that's going to be, then you know what kind of loop to use, right? )



  • 16

    Do Loops (6.1, 6.2)

     

    14

    21

    Today we're going to be working on the loop problems I introduced on Thursday. You should start with the first one and do it on your own, then continue to the next, and so on.



    23

    For Next Loops (6.3)

    15

    28

    Do Problems 2-5 on an old lab final exam. Note that our final is on paper, but these are good practice anyway.

    Do all the problems on this old final that do NOT use arrays(Skip problem 4)

    30

    Review.

    On Line Quiz 5 due today at Midnight.

    16

    Final Exam Week