![]() |
CSCI 207 - Programming in Visual Basic
|
|
Week Starting | |
Chapter 1-Introduction to Computers and Problem Solving & Other Information about the course
Link to download Visual Basic and some other tools.
Writing your first Visual Basic Project
Chapter 2 - Visual Basic Controls and Events Lets do some examples in class from the book. Lab1: #2 Page 110 & 111, Repair Bill. Create a directory on the filestore domain under your account and call it "Lab1". Place this project files in that folder. Save your homework and labs to:** In windows Explorer ** \\filestore.cs.edinboro.edu\CSCI207\Fall2018 Use your CS username and password, as if you are login in at the CS lab |
|
9/3 |
Chapter 3 - Variables, Input, and Output
Start Chapter 4 Possible ones to look at:
|
9/10 |
Cover anything we didn't already in Chapter 4 If time, start chapter 5, some in class sample. ** MsgBox parameters ** (for pop up boxes) In-class example :Compound Interest (we worked on this already) We could make some functions for the interest problem.....
What is Critical Thinking, and how does this relate to programming.
|
9/17 |
Let's try a problem requiring decisions like nested if or Case statements. Also lets look at the various types of input such as text box, radio button, list box. We're ahead so lets look at Chapter 5's notes
|
9/24 |
Chapter 5 - General Procedures
Exam 1 - 9/28
|
10/1 |
- Loops Let's start a project today that will use loops for your take home project next week: We'll write a program to run a linear regression using least-squares: What is that? This is a way to predict or model data where it is thought that one variable effects the other. (Independent variable → dependent variable) This is done by taking known pairs of data where is looks at though there is a correlation and applying it to a calculation. Write a program where the users enters in two pieces of data (paired) into a list box per line separated by a comma. (You can change this if you want; may be easier to have 2 list boxes) Grab that data and run the least-squares approximation formula. Formula: (see below because this box is too small) Ok, so you all know that a straight line uses the form y=mx+b where m is the slope and b is the y-intercept. You are going to use the formula below to get the m and b Then provide some input for the independent variable (m) and you tell the user y. Y will be the predicted correlated value for m. For example, If I gave you 30 pieces of paired data that is height and weight, then I put in a a height into an input box, click the button, your program should predict this person's weight.
|
10/8 |
Work on the Least-squares project described above for your
out of class project
m= (n*(sum of xi * yi) - (sum of xi)
* (sum of yi)) / (n * (sum of xi * xi)
- (sum of xi)2 ) b = ((sum of yi) - m * (sum of xi))/n Make a functions for:
|
10/15 |
- More organized way to store a lot of related data Good example of using parallel arrays: American to British Translations -> Dictionary.txt Good 2-D Array Example: Number 25 page 373 Text file for the 2-d array example: Rain.txt Months.txt Good 1-D Array example
1-D Array example Let's compute the average of a list of numbers. Make sure you load the numbers into an array first. Then loop again and determine the average. We are using an array as practice. Sorting an Array Example Example implementation of an array of Records. Page 356 & 357: 28,29,30,31 Sample 2-D problem 28 page 374
|
10/22 |
Chapter 8 - Text Files Let's edit the Justice program, add some new features. This week I also want to make sure we've practiced the Try-Catch block. Some text files to mess with: USPres.txt Lets look at #20 - 26 page 428 & 429 Let's do an old exam I dug up, I want you to give it an honest try first. If there's time let's assume they are not sorted, and we need to sort them first.
|
10/29 |
Let's do a practice exam: Load this file into an array of
structures: Famous.txt Exam 2 - 11/2
|
11/5 |
Chapter 9 Additional Controls and Objects Multiform Projects Practice:
In-Class Lab: Maybe: p. 476 #53 - The birthday problem (finish this) and/or Add a tool-tip to one of our earlier programs Add a a picture box that plots our linear regression. p. 477 #54 - Carnival Game
|
11/12 |
Do some more examples of database queries. Download the following databases:
|
11/19 |
Web Applications - Making a web page with Visual Basic Mobile Friendly Loan Calculator You will notice a WWW folder in your directory on the cs domain. Put any of your web applications there. Don't make any subdirectories other than the ones VB creates on its own. The URL for the your web pages will be: Your path in Windows explorer is: \\filestore.cs.edinboro.edu\students\USERNAME\CSCI207\WWW When creating change the framework to 3.5, create your project in the WWW directory, if asked choose to "open the existing website". Also!! Delete the web.config file from WWW folder. For some reason doing this lets people see it off of the server (vs. localhost) EVERY time you save it. Thanksgiving Break
|
11/26 | Continue working on the web application Web Stuff: |
12/3 | Review for Final Exam: Look at #1 page 506 Membership List Download text file: Memberphones Solution for the Membership list
|
|
Assignments: |
|
We start then you finish for grade: | |
Lab 1 | Auto Repair |
Lab 2 | Investment Calculator |
Lab 3 | Age on Planets |
Lab 4 | Eggs |
Lab 5 | Regression Computation |
Lab 6 | Supreme Court Justices |
Lab 7 | Megacities Database |
Lab 9 | Loan Calculator On-Line (send me URL) |
Assignment # |
Due Date |
Description |
|
1 |
9/13 | Restaurant Menu; Page 176 | |
2 |
10/17 |
Notes:
I am painting the picturebox1 pixel by pixel. Where Image.XDimension and Image.YDimension is the width and height of the image that is being looked at. These were read in from the file near the top Sub DisplayImage() PictureBox1.Width = Image.XDimension - 1 |
|
3 | 10/31 | Game of Pass the Pigs Implement this in Visual Basic. Use some image when you roll. |
|
4 | 12/5 | What If Loan Analyzer Create a web page that is based off of your 1st Exam. A user can use your page to ask questions of a loan and determine "What If" analysis. CSS I used to make mine mobile friendly Good Background Generator: http://bg.siteorigin.com/
Notes: a) I will run your page on my phone, check for blank fields and characters in the text boxes. b) the rate function will not always converge to an answer, so it will either crash or give a crazy negative answer. c) web site for a rate formula (you'll have to solve for the rate "r") d) My Example (optimized for a cell phone)
|