QT3

=CS602 VB QT3 Pd 2 & 5=

//** __Objective 1:__ **// //** Create a program that accepts a student's last name, first name, middle initial, and grade. Trim and concatenate the parts of the name. Output the correct string literal: freshman, sophomore, junior, or senior, based on the grade. Give corrective error messages for bad data. **// //** __Objective 2:__ **// //** Work well with a partner who you did not pick to make the best program you can that successfully runs and produces correct output for all test data. **//
 * Friday April 1, 2011**

**Paper and Pencil****:** **1.** Which of these is not a synonym of concatenate? A. connect B. attach C. join D. make several into one E. eliminate

**2**. What is the concatenation operator?

A. Removes leading or trailing spaces. B. Puts tinsel on the tree. C. Adds color to the textbox. D. Abbreviates words.
 * 3.** What does the Trim function do?

__Program__: **Class.frm** You may work on this program with a partner or individually. __Paper and Pencil__**:** On the same paper as you Do Now Tell what progress you made on the Class.frm program.

//Objective: Use strings and string functions effectively.//
 * Wednesday March 30, 2011**

Save your programs to the desktop so Miss Hangen can check them.

__Program__: **ModeTrans****.frm** (Directions in binder)

Upload programs to your Gaggle digital locker.
 * Delete from the desktop. **
 * Empty the recycle bin. **

//Objective: Use strings and string functions effectively.// **Think - Pair - Share** Which of these lines of code is the best for catching a password that was not confirmed correctly? a) If Len(Password) <> Len(Confirm) Then b) If UCase(Password) <> UCase(Confirm) Then c) If Password <> Confirm Then Why?
 * Monday & Tuesday March 28 & 29 2011**

__Paper and Pencil__: **Questions After** **RegisterJPM.frm**

Correct **RegisterJPM.frm and test thoroughly.** Have another student test yours and vice versa. Invalid data must be caught and given an appropriate error message. Here are the 7 constraints:
 * 1) Username too short
 * 2) Username too long
 * 3) Username not all lowercase
 * 4) Password too short
 * 5) Password too long
 * 6) Password the same as username (regardless of case)
 * 7) Confirm not the same as password

If the input for username, password, and confirm are all acceptable, give the message that the person is registered. See the test data and what the form will look like in the notebook. Turn in the **Questions After Register** and the **Self-Evaluation of Register.frm** (page 8) Upload programs to your Gaggle digital locker.
 * Delete from the desktop. **
 * Empty the recycle bin. **

// Objective: Use strings and string functions effectively. // __Paper and Pencil__: Finish **Questions Prior to Register.frm** __Program__: **Register.frm** You may use the code and form shown on the directions in your binder or design your own. Your program must work with the same stipulations. Upload programs to your Gaggle digital locker.
 * Friday March 25, 2011**
 * Turn in your self-evaluation.**

// Objective: Use strings and string functions effectively. // __Finish__: **RegisterLogin.sb**
 * Thursday March 24, 2011**

__Paper and Pencil__:
 * Discuss with other students** and come up with a list short-comings of the Scratch **RegisterLogin.sb** program as it compares to actually creating a login for a website.

__Program__: **StrCompFunction.frm** - Use this form to fill in the appropriate code which can be found on the **Notes on the StrComp Function** papers in your notebook and test with the data on the notes pages. - Use your notebook, this website, and Visual Basic only. - To make the program better, include the **Trim** function. - When your program is finished, have Miss Hangen check it. [|StrCompFunction.frm] __Paper and Pencil__: **Questions Prior to Register.frm** Turn in your Do Now paper. Upload programs to your Gaggle digital locker.

// Objective: Use strings and string functions effectively. // __Finish__: AlphaAnimals.frm
 * Wednesday March 23, 2011**



__Scratch Program__: **RegisterLogin.sb **

__Paper and Pencil__:
 * Discuss with other students** and come up with a list short-comings of the Scratch **RegisterLogin.sb** program as it compares to actually creating a login for a website.

// Objective: Use strings and string functions effectively. // Usually usernames for internet services are not case-sensitive; therefore, if you registered with the username, **//MyUserName//**, but you typed in **//myusername//** the next time you logged in, it would still work.
 * Tuesday March 22, 2011**

1. **True or False:** When the username is case-insensitive, **//tether123//** would be considered a match for **//Tether123//**.

Passwords for internet services are always case-sensitive; therefore, if you made you password, **//MyPassword5//**, but you typed in **//mypassword5//** the next time you tried to log in, it would tell you the password is in invalid.

2. **True or False:** When the password is case-sensitive, //**escapehatch**// would NOT be considered a match for //**EscapeHatch.**//

One way to compare strings that do not need to be case sensitive is to make the characters all the same case then compare.

3. **True or False:** LCase("Tether123") = LCase("tether123")

4. **True or False:** LCase("BiBiCiC") = LCase("biBiCici")

To check if a password match is correct check that they are exactly equal.

5. **True or False:** "qwpoGH" = "gwp0GH"

Another way that Visual Basic uses to make string comparisons is the StrComp function. Read about it in your notebook. __Read__: **Notes on the StrComp Function** on **p**ages 1 to 4 in the back of your notebook. __Paper and Pencil__: **StrComp Function Questions** __Program__: **AlphaAnimals.frm** Turn in the **StrComp Function Questions**.

// Objective: Use strings and string functions effectively // Finish back assignments if necessary; otherwise, move on through the binder.
 * Monday March 21, 2011**

// Objective: Use strings and string functions effectively. // media type="custom" key="8717518" __Program__: **Case.frm** Finish back assignments if necessary; otherwise, move on through the binder. Upload **Case.frm** to your Gaggle digital locker.
 * Friday March 18, 2011**
 * Delete from the desktop. **
 * Empty the recycle bin. **

//Objective: Use strings and string functions effectively.// __Finish__: **StringLength.frm** __Program__: **StringComp.frm** (Directions in binder.) __Paper and Pencil__: **String Comparison Part 1 Questions** (in binder) ** These questions must be done prior to revising to StringComp2; otherwise the answers will not be correct. ** __Program__: **StringComp2.frm** (additions to StringComp.frm) __Paper and Pencil__: **String Comparison Part 2 Questions** Upload **StringComp2.frm** to your Gaggle digital locker. **Delete from the desktop.** **Empty the recycle bin.** Turn in **String Comparison Part 1 Questions** Turn in **String Comparison Part 2 Questions**
 * Thursday March 17, 2011**

//Objective: Use strings and string functions in programs.// __Finish__: **Fence.frm** __Finish__: **StringExample.frm** __Read__: **More String Notes with String Functions and ASCII Codes** (In binder) __Paper and Pencil__: **Strings Questions with Word Bank** (In binder) __Program__: **StringLength.frm** (In binder) Make sure you did all the recent Do Nows and Tickets out the Door. Turn in your finished papers.
 * Wednesday March 16, 2011**

//Objective: Use strings and string functions in programs.// Look at the ASCII codes on the **More String Notes** in your notebook to determine what sentence will be created by translating these ASCII codes into their corresponding letters/characters. Do this on the back of the assignment paper. 87, 105, 108, 108, 32, 119, 101, 32, 103, 101, 116, 32, 109, 111, 114, 101, 32, 115, 110, 111, 119, 32, 111, 114, 32, 83, 112, 114, 105, 110, 103, 63 __Read__: **More String Notes with String Functions and ASCII Codes** __Paper and Pencil__: **Strings Questions with Word Bank** Turn in your papers.
 * Tuesday March 15, 2011**

//Objective: Use strings and string functions in programs.// __Read:__ **More String Notes with String Functions and ASCII Codes** in your notebook or here. [|StringNotesMore.doc] __Program__: **StringExample.frm** Directions in your notebook. __Paper and Pencil__: Explain what you learned about strings from doing the program. Turn in paper. Upload **StringExample.frm** to your Gaggle digital locker.
 * Monday March 14, 2011**
 * Delete from the desktop. **
 * Empty the recycle bin. **

//Objective: Calculate remainders with the use of the modulus operator.// Look at pages 1-3 of the directions for Paint.frm and page 1 of the directions for Fence.frm in your notebook.
 * Friday March 11, 2011**

__Paper and Pencil__**:**

The formula you used for calculating the surface area to be painted in Paint.frm was SurfaceArea = 2 * Width * Height + 2 * Length * Height + Length * Width. 1. What formula will you use to calculate the perimeter of the fence in Fence.frm?

In Paint.frm you had to buy entire cans of paint. 2. In Fence.frm, what must you buy in whole units?

In Paint.frm the contents of a can of paint would cover 400 sq ft. 3. In Fence.frm, how long is a section of fence?

In Paint.frm you multiplied the cost of a gallon can of paint by the number of cans needed to find the total cost of paint. 4. In Fence.frm, what will you multiply to find the total cost for all the sections of fencing needed?

5. **True or False:** You can use the comparable concepts from Paint.frm as a guide for doing Fence.frm as long as you make the appropriate adjustments.

__Program__: **Fence.frm** Save to the desktop. Directions in the notebook. No code provided. Read the directions carefully. Turn your Do Now. Upload Fence.frm to your Gaggle digital locker.
 * Delete from the desktop. **
 * Empty the recycle bin. **

//Objective: Calculate remainders with the use of the modulus operator.//
 * Tuesday March 8, 2011**

Run your **Turkey.frm** program. Enter the answers your program gave for the data in this Google form.

media type="custom" key="8611810" __Program__: **Paint.frm** Look over all 7 pages of directions in the notebook before starting to create the program. Test thoroughly yourself. Have your partner test yours and you test your partners. Improve as necessary and test again. Have Miss Hangen check your program. Upload to your Gaggle digital locker.

//Objective: Calculate remainders with the use of the modulus operator.//
 * Monday March 7, 2011**

Read all 4 pages of directions in the notebook before starting to create the program. There is an explanation before you get to the actual code. __Program__: **Turkey.frm** You may use the form provided. Read all 4 pages of directions in the notebook before starting to create the program. There is an explanation before you get to the actual code. Test thoroughly yourself. Have your partner test yours and you test your partners. Improve as necessary and test again. Have Miss Hangen check your program. Upload to your Gaggle digital locker.

//Objective: Calculate remainders with the use of the modulus operator.//
 * Friday March 4, 2011**

Save programs on your desktop from Gaggle that you need to have checked. __**Program**__**:** **ConvertSeconds.frm** Include the comments when you type the code. Directions in notebook. Have your partner test yours and you test your partners. __Paper and Pencil__: **Convert Seconds Questions**

Have your notebook open to the code for the ConvertSeconds.frm program. Refer to this code and the comments about the code while answering the questions. Also have your ConvertSeconds.frm program ready to run to answer some of the questions. Do the assignment on paper first, and then transfer your answers to the computer. Try to get the best score you can the first time. To improve your score, look over the code in the notebook, correct your answer on paper and retake the quiz on the computer. Make sure you put your first name and last name in the name box of the quiz, so you get credit for it. media type="custom" key="8570712"

//Objective: Calculate remainders with the use of the modulus operator.//
 * Thursday March 3, 2011**

__Think - Pair - Share__: What is different about \ division compared to / division? What is calculated with the Mod operator? Try Miss Hangen's **RemainderCalculatorPlain.exe** which is in the Thawspace. Study this code and the results, and then use what you know about, /, \, Mod, Single, Integer to calculate the following answers. You may use a calculator. __Paper and Pencil__: Use 124 for the first number and 5 for the second number. 1. What will be the message box output for line 3 of the code? 2. What will be the output for line 6 of the code? 3. What will be the result for line 9 of the code? 4. What will appear in the message box for line 12 of the code? 5. Which symbol is used for regular division? 6. Which symbol is used to calculate the integer part of a division? 7. What key word is used to calculate the remainder of integer division? 8. What data type must be used for the answer to a division problem to show its decimal values? 9. What data type is used to round the answer to a division problem to the nearest integer? __Self-Evaluate & Peer-Evaluate__: Use the Evalution forms in your binder to evaluate your **IceCreamVolume.frm** program and your **ConeArea.frm** program. Trade places with another student and evaluate each others programs. Turn in the evaluation forms. __Program Check__: Have Miss Hangen check the programs that have not been graded. Sheet with that info will be provided. Turn in evaluation sheets. Turn all paper and pencil assignments that are in your binder whether finished or not. Turn in missing assignment list.
 * Division Examples:**

//Objective: Calculate remainders with the use of the modulus operator.//
 * Friday - Wednesday February 25 - March 2, 2011**

__Paper and Pencil__: 1. If a DVD says that a movie is 176 minutes long, how many hours and minutes is that?

Read these webpages to study up on long division and finding a remainder. @http://www.mathsisfun.com/long_division2.html @http://en.wikipedia.org/wiki/Long_division @http://www.homeschoolmath.net/teaching/md/remainder.php @http://demonstrations.wolfram.com/LongDivision/ Do the long division to find the quotient and remainder. ** NO DECIMALS ** 2. 271 / 60 3. 34 / 7 4. 17 / 12 5. 7895 / 5280 6. 88 / 3 7. 12345 / 52 8. Give some examples of when you think you might need to use the quotient and the remainder instead of a decimal number? __Read__: Let's talk about integer division in computer science. When you are using integers and would like integer results when dividing, there are some things you need to know. Division which results in a possible decimal answer uses the slash symbol as its operator. The slash symbol, /, is found on the same key as the ? on the keyboard. When you need to divide integers and get the quotient as just the integer part of the answer, you must use the back slash, \, which is found on the key above the Enter key. Since you might also need the remainder, you will need a second division using the modulus operator, which is the keyword Mod in Visual Basic. When you use Mod as the operator, the result is the integer remainder of the division problem.

35 / 4 has a quotient of 8.75 or 8 and 3/4 35 \ 4 has an integer quotient, which is 8 35 Mod 4 has an integer remainder which is 3
 * Math Example:**

Quotient = Dividend / Divisor //'decimal answer// IntegerQuotient = Dividend \ Divisor '//integer answer, if there would be a decimal it is chopped off, number is not rounded// Remainder = Dividend Mod Divisor //'result is the integer remainder that could be calculated through long division// __Scratch Program:__ **Mod.sb** Directions in your notebook.
 * Visual Basic Example:**

__VB Program__: **Remainder.frm** Create your own remainder calculator that looks nicer than the one linked below. The user will input the dividend and the divisor. Your program will display as output, the integer quotient and the remainder. Make up your own test data and verify that your program gives the same results as the quotient and remainder calculator at @http://www.analyzemath.com/Calculators_3/quotient_remainder.html Also test these: Dividend = 35, Divisor = 4 Dividend = 927, Divisor = 0 Dividend = 0, Divisor = 16 Dividend = 7, Divisor = 49 Dividend = 64, Divisor = 12

__Make It Better:__ After you know that your program does this much correctly, make it better by including the KeyPress procedure, checks for IsNumeric, and a check of bad numeric data.



Upload to your Gaggle digital locker.

//Objective: Write programs that require nested switch structures.// //Objective: Write programs that catch multiple types of bad data.//
 * Thursday February 24, 2011**

Find your previous version of **Chirps.frm** in your Gaggle digital locker. Save it to the desktop with the new name, **ChirpsBD.frm**. Open it and test it. If you cannot find it use this form. [|ChirpsBD.frm] __Program__: Add code to **ChirpsBD.frm** according to the directions in your notebook.

Have a partner check your program and you check a partners program. Improve as necessary. Upload **ChirpsBD.frm** to Gaggle digital locker.

//Objective: Debug programs with multiple programming structures.// //Objective: Calculate surface area of a sphere.// __Paper and Pencil__: Surface Area of a Sphere Test Data Keep this paper to do your ticket out the door. __Program__: **SphereError.frm** [|SphereError.Frm] This program has already been created but contains lots of errors that you must fix. See the notebook for directions Test your partners program. Have your partner test your program. Improve your program. __Paper and Pencil__: Put this on your Do Now paper. Describe the process or thinking you used to debug the program. Upload the corrected program **SphereArea.frm** to your Gaggle locker.
 * Wednesday February 23, 2011**

//Objective: Write programs that require nested switch structures.// //Objective: Write programs that catch multiple types of bad data.// //Objective: Write programs that meet all the requirements of the problem statement.// //Objective: Calculate the surface area of cones and adjust for special circumstances.// Turn in previous paper and pencil assignments. __Paper and Pencil__: **Surface Area of a Cone Do Now** (Use vti83.exe calculator in Thawspace) __Reading__: Read the 4 pages of directions for **ConeArea.frm**. __Paper and Pencil__: **Cone Area Do Now** Discuss as necessary or desired with a student near you. Highlighters available.
 * Thursday & Friday February 17 & 18, 2011**

__Program__**: ConeArea.frm** Directions are in your binder. //If time permits, make the program better by including option buttons to allow the user to choose whether the cone is open or has a circular surface. Adjust code accordingly.// __Paper and Pencil__: Self-evaluate using page 4 and test data from the directions. __Interact__: Have another student test your program with the rubric and test data. When you are sure it is wonderful, have Miss Hangen try to crash it......I mean grade it.

__Paper and Pencil__: **Homework - Surface Area of a Cone** Also measure or estimate the dimensions of a cone that you come across and bring that to class so you can use your program to find its surface area.

Upload to your Gaggle digital locker. Turn in your evaluation page and any finished paper and pencil assignments.

//Objective: Use geometry formulas.// //Objective: Create your own test data and correct results.// //Objective: Write programs that catch multiple types of bad data.// __Paper and Pencil:__ 1. Why do you think it would be good to check IsNumeric and out of range data in separate structures? 2. This picture illustrates how the If Then Else End If sets go together. Notice that they are nested. Describe what you think nested means in this case. __Program__**: IceCreamVolume.frm** Directions are in your binder. Use this form. Test bad and good data. See your binder pages and the table below. __Paper and Pencil__: **Surface Area of a Cone** __Paper and Pencil__: **Surface Area of a Cone** Use the self-evaluation rubric to check your program and have Miss Hangen check it. Turn in the form.
 * Wednes****day February 16, 2011**
 * Cone Radius || Scoop Radius || Cone Height || Unit of Measure || Volume with units ||
 * 1 || 2 || 4 || inches || 37.68 cubic inches ||
 * 2.5 || 4.5 || 6.5 || cm || 424.03 cubic cm ||

//Objective: Use geometry formulas.// //Objective: Create your own test data and correct results.// //Objective: Write a program that catches data that is not numeric.// __Paper and Pencil:__ 1. Why do you think we use the Val assignment statement **AFTER** the If IsNumeric line? 2. Which of these would be the best message for the action of the else when the condition IsNumeric(txtRadius) evaluates to false in the If Then structure? a) wrong! b) Use numbers. c) Not positive. d) Good data.
 * Tuesday February 15, 2011**

__Finish Program__**: CylinderArea.frm** __Paper and Pencil__: **Volume of Cones and Spheres** __Finish__: **Volume of Cones and Spheres** 1. Does your program give these results? Why or why not? Fix, if not. Show Miss Hangen your program. 2. Why do you think it would be good to check IsNumeric and out of range data in separate structures?
 * **Radius** || **Height** || **Volume** ||
 * ald;f || 5 || INVALID DATA -- Use numbers. ||
 * 5 || garbage || INVALID DATA -- Use numbers. ||
 * 1.5 || 6.1 || 71.592 square units ||
 * 3 || 4 || 131.88 square units ||

//Objective: Use geometry formulas.// //Objective: Create your own test data and correct results.// //Objective: Write a program that catches data that is not numeric.// __Paper and Pencil:__ Create Your Own Test Data for These Geometry Formulas: **Surface Area of a Right Circular Cylinder** __Program__**: CylinderArea.frm** **Directions:** Use the directions in your notebook. Test with good data and bad data. You will be using **IsNumeric** to check for data that are not in the form of numbers. Use the PrismArea.frm directions in yellow as a guide.
 * Monday February 14, 2011**

Does your program give these results? Why or why not? Fix, if not. Show Miss Hangen your program.
 * **Radius** || **Height** || **Volume** ||
 * ald;f || 5 || INVALID DATA -- Use numbers. ||
 * 5 || garbage || INVALID DATA -- Use numbers. ||
 * 1.5 || 6.1 || 71.592 square units ||
 * 3 || 4 || 131.88 square units ||

//Objective: Use geometry formulas.// //Objective: Create your own test data and correct results.// //Objective: Write a program that catches data that is not numeric.// __Paper and Pencil:__ Create Your Own Test Data for These Geometry Formulas: **Surface Area** of a Right Rectangular **Prism** [|PrismAreaTestData.doc] __Program:__ **PrismArea.frm** (form provided) **Directions:** Download **PrismArea.frm**, save to your desktop, then open it. Use the directions in your notebook to complete the code and test the data. On your paper: 1. Tell whether your program and your paper and pencil answers match. 2. Explain why or why not, and fix the paper and the program accordingly. 3. What is different about the placement of the Val statements.
 * Thursday February 10, 2011**

//Objective: Calculate the volume of a right circular cylinder.// //Objective: Create test data for the cylinder volume program.// //Objective: Write a program that catches data that is out of a logical numeric range.//
 * Tuesday February 8, 2011**

__Program__**: CylinderVolume.frm** **Directions:** Use the directions in your notebook. Test with good data and bad data.

Does your program give these results?
 * **Radius** || **Height** || **Volume** ||
 * 5 || 32 || 2512 cubic units ||
 * -10 || 5 || Invalid Data -- Use positives. ||
 * 60.5 || 0 || Invalid Data -- Use positives. ||
 * 7.7 || 1.1 || 204.79 cubic units ||
 * 3.5 || 13 || 500.045 cubic units ||

//Objective: Calculate the volume of a right circular cylinder.// //Objective: Create test data for the cylinder volume program.// //Objective: Write a program that catches data that is out of a logical numeric range.//
 * Monday February 7, 2011**

Which of these is the correct declaration for the constant pi? Write the correct one on your paper. Dim PI = 3.14 As Single Const PI As Single Const PI = 3.14 Declare PI As 3.14

Find the formula for the volume of a right circular cylinder either online on your GeoFormulas.doc. **Paper and Pencil:** Create Your Own Test Data for These Geometry Formulas: **Volume** of a Right Circular Cylinder __Program__**: CylinderVolume.frm** **Directions:** Use the directions in your notebook. Test with good data and bad data.



Does your program give these results?
 * **Radius** || **Height** || **Volume** ||
 * 5 || 32 || 2512 cubic units ||
 * -10 || 5 || Invalid Data -- Use positives. ||
 * 60.5 || 0 || Invalid Data -- Use positives. ||
 * 7.7 || 1.1 || 204.79 cubic units ||
 * 3.5 || 13 || 500.045 cubic units ||

//Objective: Calculate the volume of prisms.// //Objective: Create your own test data for the VolBox program.//
 * Friday February 4, 2011**



GeoFormulas.doc Download the Geometry Formula file, save it to your desktop, and open it. Drag the names of the geometric figures next to the correct figure on the Geometry Formula Sheet. Save it to your desktop and upload it to your Gaggle digital locker. Print it.  __Paper and Pencil:__ Create Your Own Test Data for These Geometry Formulas: Volume of a Right Rectangular Prism __VB Program__**: VolBox** (form provided)  [|VolBox.Frm] **Directions:** Download VolBox.frm, save to your desktop, and open it. Use the directions in your notebook to complete the code and test the data.

__Self-Evaluate your program__. On your paper, tell whether your program and your paper and pencil answers match. Explain why or why not, and fix the paper and the program accordingly.

//Objective: Trace the execution of program code with multiple sets of data.// media type="custom" key="8246328" __Paper and Pencil__: Trace Code for cmdType of TriangleBySides.frm for the given data on the handouts. Compare your work with a neighbor. -Make sure you have finished and handed in Chapter 4 Questions and Compound Condition Questions. -Make sure that you have made the FuelEconomy.frm and MovieTheater.frm programs better by including a message for bad data. -Have Miss Hangen check them.
 * Thursday February 3, 2011**

__Paper and Pencil__: On the back of a trace sheet, describe 2 purposes for tracing code.

//Objective: Trace the execution of program code with multiple sets of data.// Open your notebook to the code for cmdType of TriangleBySides.frm Follow the example with Miss Hangen __Paper and Pencil__: Trace Code for cmdType of TriangleBySides.frm for the given data on the handouts. After you do one trace on your own, compare with a neighbor and have Miss Hangen check it to make sure you have the right idea before you do the rest of them. Describe 2 purposes for tracing code.
 * Wednesday February 2, 2011**

//Objective: Evaluate compound conditions that contain and and or.// __Paper and Pencil__: And / Or before Triangle by Sides __Read__: Compound Conditions in If Then Else Structures __Paper and Pencil__: Compound Condition Questions Turn in papers.
 * Monday January 31, 2011**