| [Home] | Syllabus for Visual Basic COP 2170 A.S. | ||||||||||||||||||
| 4-Credits | Text: Starting Out With Visual Basic 2010 - By Gaddis & Irvine ISBN-13: 978-0-13-611340-9 | ||||||||||||||||||
| Spring 2012 | Lecture: Rm 18-202 M/W 1:00-3:00; Best Office Hours: After class | ||||||||||||||||||
| CRN 22283 | Professor: Floyd Jay Winters 752-5488, WinterF@scf.edu Office 18-131 | ||||||||||||||||||
|
1 Design |
2 Calcs |
3 If |
4 Loops |
5 Functions |
Midterm |
6 Log-in |
7 Menus |
8 Arrays 9 StreamWriter | 10 Data Base | 11 Reports | 12 Web Ex. Cr. | 14 Documentation Package | Final Exam (400 points) Visual Basic Video Tutorial Library: http://thenewboston.org/ and http://www.youtube.com/ TeachMeComputer |
|||||||||||||||||||
|
Click here for 30 Second Welcome YouTube Video from Professor Floyd Jay Winters Click here for Creating Your First Visual Basic Program (7:42 min. YouTube video) (Be sure to use your scf.edu email when you register with Dreamspark.) You may also be able to check out a Visual Studio CD from the SCF library. Free online VB books: http://www.computer-books.us/vb.php But you must have a USB thumb drive. |
|||||||||||||||||||
| 3 Month Calendar |
E-mail: winterf@scf.edu, Subject: 2170 LastName, Message:
your 6-digit ID (can be a date) To check grades: http://faculty.scf.edu/winterf/WinterF.htm, COP2170, click Grades Email: Once the course begins, all communication for this course should be through Angel email |
||||||||||||||||||
Objective: |
Give students the background to WRITE programs, learn basic programming concepts, and
object-oriented programming. This is an ADVANCED course. This course
will NOT teach students how to USE basic programs like a Word
Processor or Windows. |
||||||||||||||||||
|
Student Responsibility: All assignments should be emailed to the instructor through the
Angel online
learning software platform by the due dates provided in the assignment schedule
shown on this syllabus.
Additional questions and correspondence should be submitted to the instructor through
Angel email.
Proofread, Spell-check, professionally
write, and include a meaningful Subject line for all email.
Label all assignment email with the
assignment name in the Subject line, such as Word 4 Assignment and
your issue. The instructor will answer all correspondence within 48 hours. Statement of
Plagiarism: Plagiarism is the use of ideas, facts, opinions, illustrative material, data, direct or indirect wording of another scholar and/or writer — professional or student — without giving proper credit. Expulsion, suspension, or any lesser penalty may be imposed for plagiarism. Copying another student's work will result in a
zero for both students. Disability Resource Center Information: SCF has a Disability Resource Center (DRC) to assist students. To request academic accommodations due to a disability, please contact the DRC at 752-5295 in Bradenton or 408-1448 in Venice, or by email at DRC@scf.edu. If you have already requested academic accommodations through the DRC for this course please meet with me to discuss your specific needs. Course Evaluation: Each class assignment is worth 100 points. Grading criteria for each assignment are provided below. The instructor will typically do a pregrade for each assignment during the class just prior to the due date. Additional student resources are available on the instructor's website. Grade Scale: A:90-100, B:80-89, C:70-79, D:60-69. Lowest homework dropped.-3 pts for each day homework is late for 1st 3 weeks. -1 pt for each additional day. Copying another student's assignment will result in a 0 for both students. Starting week 3 there will be a 10-question Angel Multiple-choice quiz almost every week at the beginning of each Wednesday class. If you are late or absent there is no make up for these quizzes. If you are absent for the a prorated grade based on Final Exam will count in place. The final exam is required. There will be no makeup or substitution for the Final exam. If absent for class- ask a classmate to give you the missed notes and assignments.
Helpful Links: |
|||||||||||||||||||
| M Jan 09, 2012 Class Begins |
Begin Inventory project. VB.Net-Tutor.zip: http://faculty.scf.edu/WinterF/0ClassFolders/2170VB/ | ||||||||||||||||||
Read |
You will do an Inventory project of your choice for your own business (it can be make believe). You
will add to and refine your project week by week as you do the screen design,
data entry, calculations, error checking, log in screen, about screen, color
and font dialog boxes, save the data, retrieve the data… You will back up the
project each week, but you will never use the backups unless there is an
emergency. Always use same program week after week. Do not rename it,
just keep adding to it. Key Terms: Algorithm, Machine Language, Compiler, Keyword, Math Operator, Variables, Syntax, Procedures, Properties, Methods, Objects, Controls, Event Handler Please set VB up to save when you start a new project: Tools> Options> check "Save new projects when created) Click here for Creating Your First Visual Basic Program (7:42 min. YouTube video) |
||||||||||||||||||
| Assign 1 Chapter 2 Form Design Pseudocode Due M Wk 3 |
10pts Type an algorithm or
Pseudocode (p384) of how the first part of your Inventory
program will work, using the first three assignments on the syllabus as a guide. 10pts Type up a Flowchart (p173, p385) of how your Final Inventory program will work for first 3 weeks. (Click for free Flowchart software) or see: http://www.gliffy.com/flowchart-software/ or use Visio or Word) Click here for Creating a Flowchart in Microsoft Word (5:20 min. YouTube video) 05pts Name your new project with a short relevant name. Ex: InvParts or InvCars or InventoryDVDs 05pts Set the Form Title and Description in TitleBar (see Form.Text property) (p47) 10pts Begin Form design: Add main labels to form (p48) Align Labels appropriately (p49) Under the Label Name property use good object names lblTitle, lblInvDate, lblPurOrder, lblPart#, lblDescription, lblCost, lblQuantity, btnExit… Set at least 2 noticeably different Label border styles (p82) Most Label text should be left aligned (p89), Numbers right aligned (p90) (Formatting is not yet required) 10pts Use at least two noticeably different Label Fonts (p50) and label Colors (p81) 10pts Add a relevant Picture Box (p54), such as a logo 05pts Add Button or other control (p68) to display a message (p71) lblMessage.Visible = True 05pts Add [Exit] Button (p76) to closes the project. btnExit Code: End or Me.Close (p79) 10pts Add 3 comments or REMs (') at the top of the code: your name, project name, creation date (p79) Also add a “To Do” Section. Ex: ' To Do: Add Calc for Total Inventory 10pts Add a working Message box (p90) 10pts Add a Clickable Image (p93) * Add a Tab Control (it’s in the toolbox; if we do not do this upfront it may cause problems later: sometimes if you paste existing code to a new Tab you may have to retype the “handles” section at the end of the sub. Ex: handles txtCost.leave * Make sure everything is attractive, well designed and lined up. * Save form with a good form name (like InventoryMainEntry - this is the name on the disk). This will be graded in the lab on your USB drive. You must have a USB thumb drive. [Insurance (+5): E-mail me your 6-digit ID (see top of syllabus)] |
||||||||||||||||||
| Good debugging practices: a. Make the problem as simple as possible b. Create a project called Junk with just 2 text boxes to test your code before adding it to your real project c. Insert Breakpoints (click in gray side bar to get red circle) then run program, tapping [F8] or [F11] to step through d. Use Debug.WriteLine and view the Output or Immediate window to see the value of your variables e. Use VB Help or do a search on the Web for help or sample code |
|||||||||||||||||||
| Continue Inventory project with input Textboxes and Variables – Screen Grade based on assign 1-2 Know: Object, Class (pattern), Property, Method (object action such as .close or .show), Event (user action such as keypress), Procedure (such as Private Sub...) |
|||||||||||||||||||
| Assign 2 Chapter 3 Calculations Practice grade: M Angel Quizzes on Wednesdays: |
Click on last week’s project folder and backup: [Ctrl] + [C], then [Ctrl + V]. Do NOT work with the backup. Do not rename your main project or your project folder. 10 Add corresponding Textboxes (p110): txtInvDate, txtPurOrder, txtPart#, txtDescription, txtCost, txtQuantity, lblCalTotal (Autosize=False) 10 Add button to [Clear] all textboxes (p111) Set focus on first textbox on clear (p116) txtZ.Clear or txtZ="" 10 Format and set input txtlInvDate to default to today’s date (p129, p137, p155) and set all other appropriate defaults on clear 10 Make sure the tab order is top-down, left right for ALL textboxes (p117) (View > Tab Order) 10 Assign Hotkeys to all buttons (Text property: E&xit) (p119) | Set a default or Accept button (p121) 05 Dim and use at least 1 local variable (within a Sub procedure) (p132) 05 Dim and use at least 1 global variable (scope, p133) Ex: Const Markup As Decimal = 0.50 10 Add a button (btnCalc) or subprocedure (Sub Calcs) to [Calculate] (p150): lblTotal.text = CDec(txtCost.text) * CInt(txtQuantity.text) OR lblTotal.text = Val(txtCost.text) * Val(txtQuantity.text) Add Option Strict (p141) . Option Strict On avoids subtle errors, but you will need statements like: OR Qty = CInt(txtQty.Text) and Cost = CDec(txtCost.Text) or Convert.ToDecimal(txtCost.Text) 10 Format ALL numeric input (on lost focus) and all calculations and Format system lblDate (this label usually appears at the top-right of the form) (p153) 10 Add a Try/Catch Exception Handler with a MessageBox for your calculation (p161) 10 Add a GroupBox (drag from toolbox) with two or more RadioButtons (drag from toolbox) in it. (p169) * Add top or side REMs to explain harder code or logic that you might forget in the future. |
||||||||||||||||||
| Refine Inventory project - Handling Exceptions and Messages – Screen Grade based on assign 1-3 | |||||||||||||||||||
| Assign 3 Chapter 4 If / Then Validation Due W Wk 5 |
Click on last week’s project folder and backup: [Ctrl] + [C], then [Ctrl + V]. But do not use the backup. 10 Add If/Then/Else statements to check for valid input range for Cost and Quantity, display a message box on lost focus. (p209, p211) [Ex: Cost >= 99] allow reentry (Ex: Is Cost too high? [Yes] [No]) Add an ElseIf statement (p221) (optional) 10 Use an And and/or an Or logical operator 10 Be sure to test for Nulls ("") or No Input (=String.Empty) (p233) before formatting or calculating. 05 Make txtPart# or txtState use the .ToUpper method on lost focus (p233) 05 Use the .Trim method to remove any leading or trailing spaces in txtPart# or txtState (p237) 05 Use the .Substring method to limit the length of txtPart# or limit txtState to 2 characters (p238) 05 Use at least one .TryParse method to confirm valid data conversion (p253) 10 Add If statements to check for IsNumeric for both Cost and Quantity (p236) Avoid negative logic. 10 Use a relevant Select Case statement, perhaps to make a decision and print out multiple possible messages for your project. (p246) 10 Use the If then Else structure to check numeric ranges for both Cost and Quantity (p256). Use a Beep command and Messagebox with a clear Title and clear Prompt (Is Cost too High?) and an .Exclamation icon (p242) to go back or accept and continue. 10 Add a CheckBox for Supplies. If chkSupplies.Checked = True Then display message "Not Tracked Inventory", if not true do not display a message. (You may choose use another active option with the chkbox.) 10 Calculate decTotal and set lblCalTotal equal to decTotal All Calculations must now work (Replace [Calculate] button with Call) Format ALL Dates and Numbers Ex: txtSubTotal.Text = FormatNumber(txtSubTotal.Text, 2) * Organize code: The Title and ID comments are at the top, then comes the Class, then Form Load, Create a #Region for Input code, a #Region for Calculations, and a #Region for Buttons * Add an ErrProvider to one of your numeric input TextBoxes. |
||||||||||||||||||
| Continue the Inventory project - SCREEN GRADE based on assign 1-4 | |||||||||||||||||||
| Assign 4 Chapter 5 Lists and Loops Due M Wk 7 |
10 On a separate tab add a Do-While Loop to do anything you choose - it can be playful, but make sure it correctly demonstrates a Do-While loop. (p298) Points will be awarded for how interesting or how good it is. Feel free to do an Internet search. Also see LoopDemo.zip 10 Add a Save button to your form to do a running total dollar amount (Accumulator) of all the transactions: GrandTotalCost += TotalCost (or decTotal += decCost) (p303) 10 Add a Counter (itemCount) to increment the total number of items added when the Save button is pressed. (p299) 10 On a separate Tab use a For/Next Loop (p310) and a Timer (p514) for a countdown (decrement) and some type of animation 10 Add a Drop-Down Combo Box for parts or for Description or Part# (p321) 10 Add a ToolTip control and put ToolTips to all Buttons: (Drag only one ToolTip control to component tray; then set Tooltip property for each control) (p329) 10 On a separate Tab, add an Input Box to input the number of years for a Loan Calculator (p286) 10 On a separate Tab, use a formatted Pmt function for a Loan Calculator (p331) lblPMT.Text = Pmt(txtRate.Text / 12, txtYrs.Text * 12, -txtLoanAmt.Text) Add: 1. Format all numbers. 2. If Rate is greater than one, then Rate is equal to Rate divided by 100. 10 Use a Loop with a header to display in a ListBox (p288) and a For/Next Loop (p310) to do the Loan Calculator (p335) * Add a Header to the ListBox using Items.Add with & and vb.Tab ex: "Month: " & vb.Tab & "Payment: " & vb.Tab & "Interest: " & ... 10 Add the additional code needed to make the Loan Calculator work (p335) |
||||||||||||||||||
| Continue the Inventory project - SCREEN GRADE based on assign 1-5 | |||||||||||||||||||
| Assign 5 Chapter 6 Procedures, Due M Wk 8 |
If you cannot find a way to make these relevant to your project, add a new tab called Functions and place a working demo Procedure and Function there. Feel free to use the Internet to find sample custom VB functions and sample custom procedures that pass arguments. 30 Declare a Procedure and pass an Argument to it. (p364) Make up your own, do not use my sample. "by reference"- procedure can make changes to the original argument ("by value" - no changes) 30 Declare and use a programmer-created function with your program (see Function.zip) (p371) - If you use my demo functions above: make up your own function or modify another from the Web. 10 Demonstrate during screen grade how to use a Breakpoint (p378) and the Debugger to Step Into [F8] and Step Over as in execute the remainder of a procedure [Shift F8] (p377) 10 Demo at least 1 Debug line in Call Calculations [Ex: Debug.WriteLine("txtCost= " & txtCost.Text)] - During Run time there is an Immediate window button on the menu bar that will show values. Sometimes the values are displayed in the Output Window (View > Other Windows > Output). If necessary use VB help. 10 Add a formatted DateTime Picker, so there is both a default Inventory date (txtInvDate) and a System date (today’s date: lblSysDate) (p296) 10 Change form’s icon (see form Icon Property). Do a search on icons, download an icon maker, or using a program like Photo Filtre make a small 32x32px image (.ico) and choose Tools > Export as icon |
||||||||||||||||||
|
Midterm 200pts |
50 Question Multiple Choice online MIDTERM on commands, terms, and concepts from assign. 1-5. See MidtermReview on the FTP site and MidtermPracticeVB1.Zip. |
||||||||||||||||||
| Faculty Professional Development Day 03/02/12 Spring Break 03/10/12-03/18/12 | |||||||||||||||||||
Withdrawals: |
In accordance with the SCF policy as stated in the college catalog, students may withdraw from any course or all courses without academic penalty of a WF by the withdrawal deadline as listed in the SCF academic calendar. The student must take responsibility for initiating a withdrawal. Please talk your professor first. |
||||||||||||||||||
| Add a Log-in form with a Password to Inventory project – SCREEN GRADE based on assign 1-7 | |||||||||||||||||||
| Assign 6 Chapter 7 Multiple Forms 100pts |
10 Add an attractive Splash Screen (Project > Add Windows Form > Splash Screen) consistent with your overall project design; make it your Startup Form (p411), link it to the Login form which links to frmMainEntry non-modal (modeless) (p414), then do a frmLogin.Close (p418) 20 Add an automatically centered (there is a property) and attractive Login Form to your Project (Project > Add Windows Form > Login Form) consistent with your overall project design which is the Startup object for your project. (p409). 10 Link to frmMainEntry with a properly formatted Password (*** there is a property). 10 Use a counter to give the user exactly three attempts to either frmMainEntry.Show or Exit. 10 Add a modal frmAbout.ShowDialog (Project > Add Windows Form > Aboutbox) linked from frmMainEntry; change the Aboutbox content through properties and [Assembly information] 20 Add a Groupbox container with at least two relevant Radio Buttons (p425) that perform some kind of action when selected or deselected. 20 Add a separate Module (Project > Add Module) (p429) (A module is all code, no objects.) You should put your Public and Constant variables in the Module, such as CompanyName, Company Address, Markup (p434) You can put your function from your last assignment in the module. But do not use the word Private! |
||||||||||||||||||
| Add a working File (Exit), Edit (Color, Font), Help (Notes, About) Menu to frmMainEntry (p439) | |||||||||||||||||||
| Assign 7 Chapter 7 Menus Due W Wk 10 |
10 File > Exit (mnuFile > mnuFileExit) - Toolbox > Menus & Toolbars > add 1 MenuStrip to form 10 Format > Color (to access the Label Collection Color Dialog Box mnuFormatColor) (p572) 10 Format > Font (to access a Font Dialog box - mnuFormat > mnuFormatFont) (p573) 10 Help > Hints (or Help) [Process.Start("NotePad", "../Hints.txt")] Make Help work with [F1] key (OR: There is a Shortcut Property added when you add a MenuStrip) Help is always last on right. 10 Help > About to display Title, Description, Author, Creation Date, Version 10 Put all form Labels in a Collection (p750) (My online demo is better using With statement) 10 Access the Collection with a For Each statement (p753) 15 Add a Context Menu (provides a Rt-click menu) (Toolbox > Menus & Toolbars > ContextMenuStrip) (p450) for changing the label collection Color and Font using a Color/Font Dialog Boxes Note: do not reinvent the wheel. Use mnuFormatColor.PerformClick() in mnuCtxColor menu sub to add the routine already created in mnuEditColor. 10 Add a working LinkLabel (in Toolbox) to a relevant link [Process.Start("http:// 05 Put all your mnuXxx procedures in #Region "Menu" |
||||||||||||||||||
| Use Arrays on Inventory project – SCREEN GRADE based on assign 1-7 | |||||||||||||||||||
| Assign 8 Chapter 8 Arrays Due W Wk11 |
30 Enter the data for at least four Inventory items. Load at least
Inventory Number, Inventory Description, and Inventory Total of each of the four (or more)
Inventory itmess into at least three 1 dimensional parallel Arrays (10 points each) called arrPurOrder, arrInvDescription, and arrInvTotal (depending on your project, you may choose three different fields, as long as one is numeric and one is alphanumeric) (p474) 20 Use a Loop to display the three 1 dimensional Arrays and all the totals stored in arrPurOrder, arrInvDescription, and arrInvTotal in a Listbox which is accessible from an option under the File menu or from a button. (p477, p482, p487). 10 Display an aligned Header (use vbTab), the Detail (all individual items), and the Grand total. 10 Use an Accumulator (p509) to display the Grand Total. The Listbox will look like this:
20 On a separate tab - create and use a two dimensional array (any items that you choose - but do not copy from a classmate) and display the results in a Listbox. (p506) Sample Dim: Dim Items(25,2) ' 25 items with part numbers 10 Sort the Array, for a sample see: Dim arrayItem() As String = {"Apples", "Carrots", "Beans"} Array.Sort(arrayStudentSort) 10 Add a Status Strip (Toolbox > Menus & Toolbars > StatusStrip), with two different working items (Properties | Items | Collections), to the bottom of frmMainEntry. (Do not just toggle one item.). Note: adding two status strips can help align buttons to the left and right side of the strip. Set Dock = none to move 2nd strip to left. 10 Points extra credit - Place a working Web browser on new tab that has a URL address bar, Back, Forward, Home and Refresh buttons (2 points each.) See: https://sites.google.com/site/daeeducation/lectures/simple-web-browser |
||||||||||||||||||
| Add a Password using a StreamWriter to your Inventory project – Screen Grade based on assign 1-8 | |||||||||||||||||||
Assign 9 Write to File Due W Wk 12 Window |
Add a menu item called Tools > Password (mnuHelp must still be the last menu item on the right) 10 Use an InputBox or a separate small form to enter the new Password. (Click to also see simple alternative) 10 Save the Password to a text file (the default extension will .txt, but you can use a different extension, so that it is not obvious to a hacker) created by IO.StreamWriter (p533-p546) 10 Use IO.StreamReader to retrieve and use the new the password on the login form (p550) Create a mini word processor that can be used to write notes or memos or comments. Access the mini word processor from a drop down menu item or use a separate tab if desired. 10 Add a RichTextBox editor (drag from the Toolbox) to your project that will be used to create a small relevant multiline text file that will be saved with a StreamWriter. 10 Add a [Save] menu item with code that will store the results of a multiline RichTextBox (p570) 10 Add a [Open] item with code to use IO.StreamReader to retrieve the multiline text file (p569) 10 Add mnuEditCopy, mnuEditCut, mnuEditPaste, mnuEditUndo, mnuEditRedo, mnuEditSelectAll 10 Add mnuFormatColor, mnuFormatFont, Upper, Lower, Center, Left, Right ... to your RichTextBox editor (p572, p577) 10 Add mnuFilePrint to print the contents of the RichTextBox editor (p575) Make sure you display the traditional shortcut keys in the menus for Copy (Ctrl+C), Cut, Paste... 10 Add a working ToolStrip (Select the ToolStrip and click the flyout arrow to Insert Standard Items, to Edit Items, and Dock. Use Properties to add small images as buttons). +10 Insurance points: Add a Structure (p581) and/or create, write, and read an Encrypted file |
||||||||||||||||||
Link a Database to your Inventory project – SCREEN GRADE based on assign 1-9 |
|||||||||||||||||||
Assign 10 Databases |
BACKUP Your Project twice before starting the database project below. (Do not use the backup; just back it up. If your data connection does not work then you will use the backup as you try again): Extra credit: Tie your project into a MySQL database instead of Access. |
||||||||||||||||||
| Assign 11 Due W Wk 15 Reports
|
Read the database file and Print a Report using the VB ReportViewer showing All Records and report totals (you must have at least 6 realistic records). Make your report layout look professional. Open Report1.rdlc. Resize it and set its properties... |
||||||||||||||||||
| Assign 13 Web app 75-100pts |
Extra Credit: Points below will be added as bonus points to your overall total points before averaging 1. Launch VB (No need to click New Project) |
||||||||||||||||||
| Build an excellent
Documentation Package in 2 (two) parts: See Final VB Documentation Checkoff List for exact breakdown of points |
|||||||||||||||||||
| Assign 14 Due T Finals week |
A: User’s Manual- front part of documentation
package: 10 Table of Contents page and an Introduction page and page numbers 10 Show and discuss Login procedure Use [Alt] + [Print Screen] or the Snipping Tool to capture your project windows, such as Login, About... 10 Show and discuss frmMainEntry 20 Discuss descriptions, defaults, data entry ranges, basic usage, data file description & path 10 Show and discuss Menu options 10 Show and discuss 2 Reports (10 each) 10 Show and discuss how to backup, and getting help 10 Show VB code in last half of documentation as a separate section. No VB code in the front part; the front part is only for the users. (-10pts) 10 Make it look very attractive and professional! |
||||||||||||||||||
| B: For Programmers- back front part of
documentation package: The back part of packet will include 10 Hardcopy of programmer code 10 Include page numbers on whole packet. The Documentation Package must be professionally bound OR put on the Web. Click to see samples. |
|||||||||||||||||||
| Final Exam | W May 2, 12:30 Two hour hands-on timed proficiency Lab exam based on 25 items listed for assignments 1-8 | ||||||||||||||||||
| 400pts | For sample: faculty.scf.edu/WinterF/0ClassFolders/2170VB/SamplesExams/VB-FinalExamPractice.htm | ||||||||||||||||||