CECS 481
Event Driven Programming II

Course Outline and Syllabus


[ Data] - [Database for Assignments 8 and 9] - [Complete Set of Slides for Course (~ 4.5MB)]

 

Back to Joel's Home Page


 


Class Schedule and Assignments (Check the day before lecture for updates).

Blue Font means that the schedule is definite. Black italic font means that the schedule is tentative.

Meeting Instruction / Reading / Assignment
1  -     9/5 Monday, Sept. 1, Labor Day (Campus Closed)
Reading:
Ekedahl, Chapter 1 and 2
Lecture: Course logistics, getting help in Visual Studio, opening and organizing a solution, tool windows in the MDE, introduction to controls and forms. 
Assignment 1 (25 Points): Open VS.NET and carefully work through all the examples in Chapter 1, either at home or in the lab (the complete solution is available at the link above). Complete all the parts of 'Hands On Projects' on pp. 33, 34 and 35. This first part of the assignment will not be turned in for credit. Program 5, pages 78 and 79 (Display) - The 'Display' assignment is the first one for credit.
2 -    9/12 Reading: Ekedahl, Chapters 2 and 3
Lecture: Controls: Label, command button, picture box, OpenFileDialog. Code editor, event handlers. Text box control, tab order, tool tips, namespaces, comments, variables and calculations.
Assignment 2 (50 Points): Write a calculator program  that works like the calculator program (under  Accessories) that comes with Windows. Your calculator will NOT have all the keys that are on the Windows version. The important thing is that the arithmetic keys (+, -, * and /), as well as the equal (=) key, work exactly the same as the ones on the Windows version. DO NOT get involved with rules of precedence - all operations are done with respect to the value currently in the result window. Further details will be given in class. In VB6, this type of program would lend itself very well to using a 'Control Array'. There are no Control Arrays in .NET, but there is a way to obtain the same functionality. For those of you who want to do something extra, see the article below on Shared Event Procedures. If you can do this assignment using the information in that article, I will be impressed.

http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dv_vstechart/html/controlarrays.asp


3 -    9/19 There will be no formal lecture this week. Students are encouraged to work ahead on their assignments in the lab.
4 -    9/26 Reading: Ekedahl, Chapters 3, 4 and 5
Lecture: Data type DateTime, System.Convert class, date-time picker, option buttons, check boxes, scroll bars, up-down control, group box, case and if statements; Strings, input validation; scope and life time of variables, function and sub procedures, messagebox class.
Assignment 3 (25 Points): Chapter 5, Program 3, pp. 206 and 207 (Sales)
5 -    10/3 Reading:  Ekedahl, Chapters 5 and 6
Lecture: Introduction to the .NET Framework: Common Language Runtime, Managed Code, Intermediate language, etc. Multi-form projects; creating objects, looping structures, PrintPreviewDialog and PrintDocument controls.
Assignment 4 (50 Points): Problem 5, Page 255  (Graph) - The PrintPreviewDialog and PrintDocument controls are new to VB. They interact directly with the GDI APIs. Use the example in the book to give you guidance with this assignment.
6 -  10/10 Reading: Ekedahl, Chapters 6 and 7
Lecture: Dynamic arrays, split function, reading from and writing to files, combo and list boxes, introduction to collections and structures.
Assignment 5 (150 Points): (GradeArray) - This assignment will count the most of any done to date. Write a multiform program which keeps a history of student grades on a semester basis. The information for each student will be saved in a dynamic array. For each student, maintain the Last Name, First Name, the social security number, the course number (e.g. CECS 281), the corresponding course grade, the semester and the year - 7 pieces of information total for each record. The grade, semester and year must be selected from a combo box. The social security number must be entered using the (COM) Masked Edit control. Your program must ensure that duplicate social security numbers are not allowed. The main form will have buttons with captions New, Save, Delete, Cancel, Search and Exit. Edit will be implicit (You will NOT have an 'Edit' button). Be sure to Enable and Disable these buttons as appropriate. In addition the main form will have four navigation buttons (First, Last, Next and Previous). Selecting Search will bring up a second form which will allow the user to Search on any of the fields of the student record. The second form should have 7 option buttons, and one textbox which holds the value of the search field. There should be a Find and Find Next button on the second form. If a record is found, display all 7 fields on the second form. If no match is found, use a message box to so indicate. Exiting the second form should take you back to the corresponding record on the first form. Don't forget to add a Help/About box to your project. Further details in class.
7 -  10/17 Reading: Ekedahl, Chapters 7 and 8
Lecture: 
Midterm Exam 1 - Friday, 10/17/03. There will be written and programming sections. Make sure that you know how to add an item to a listbox; also make sure that you know how to write code for the event where an item is selected. The written part will be closed book, the programming part will be open book. Be sure that you have your CECS Department Printing account set up before the exam. Schedule for the day: Written section 1 - 2:30; in class review of written section: 2:30 - 3:30; programming section: 3:30 - 5:30.
8 -  10/24 PLEASE NOTE: If you are working ahead, keep each assignment separate. Do not include the features in this assignment that belong to the next assignment.
Reading:  Ekedahl, Chapters 7 and 8
Lecture: Dynamic arrays, split function, reading from and writing to files, combo and list boxes.
Assignment 6 (75 Points): (GradeFile)
NOTE: 10/15/03 I have modified this assignment to eliminate the requirement for use of a collection to hold the student records. Extend Assignment 5 so that the data in the dynamic array is not lost when the program is terminated. Do this by writing the data in the array to a file on disk. Read and write the file to whatever directory the application is running.  Read the data from the file in the form load event; don't forget to save the data back to the file when the program ends (Exits).
9 -  10/31 Reading:  Chapter 11, pp. 434 - 446 (Window's Common Controls), Chapter 10, pp. 381 - 398 (Application class, error handling and dialog controls), Chapter 8 (all).
Lecture: Windows Common Controls; customizing the Open and SaveFile dialog controls; error handling; menus; DataSet class and DataGrid; begin discussion of ADO.NET..
Assignment 7 (100 Points): (Common) Add a toolbar (using the image list control) and a status bar to the Student Grades project of Assignment 8.  Use the OpenFile and SaveFile Dialogs to add a menu Open and Save function to the Student Grade project; allow the user to choose any file name (with the appropriate extension) to Open or Save As.  Replace the option buttons on the Search Form with a drop down combo box. Also, be sure the dynamic array is sorted by Last Name, so that when navigating, the names appear in order. 
10 -  11/7 Reading: Ekedahl, Chapter 8 (all)
Lecture: ADO.NET: Simple example of DataSet Class and DataGrid;  database connection, data adapter, elementary SQL, data set, data binding, currency manager, binding context.
Assignment 8 (125 Points): (ADO 1) Download the StudentHistory.mdb file from the link above. Modify Assignment 7 so that it displays the information in the Students table of the database (do not do anything with the Courses table). Your entry form will display First Name, Last Name and ID. Do not implement the 'Search' functionality. Everything else will behave as it does in Assignment 7. There appears to be some problems in binding the masked edit control to the Student ID field. So in this and the next assignment, replace the masked edit with a textbox, and provide some elementary error checking. Remove the Open and SaveFileDialog controls since you will always be opening the same database file. The database file MUST be stored in the same directory as the EXE, and both the EXE and database should be movable to any directory and everything should still work properly. Be sure that your program does not crash if duplicate student ID numbers are entered. Further discussion in class.
11 - 11/14 Reading:  Ekedahl, Chapter 9 (all); Ekedahl, Chapter 10, pp. 381 - 390 (error handling)
Lecture: Application class; Configuring datasets with multiple tables; use of the XML Designer to set relations in a DataSet; complex binding; use of the DataGrid to show details in a master/detail table relationship. Try...Catch...Finally structured error handling. Good article on binding the Windows Forms DataGrid control to a DataSource:   Knowledge Base Article 
Assignment 9 (100 Points): (ADO 2) Modify Assignment 10. Add a tab control so that tab 1 displays first name, last name and student ID. When the user switches to tab 2, show the courses (course name, number, year, grade, extended ed, etc) information for the current student on tab 1. Further details will be given in class.
12 - 11/21 Reading:  Ekedahl, Chapter 9 (all), Chapter 10, pp. 382 - 390 (error handling)
Lecture: 
Midterm Exam 2 The following chapters from the book will be emphasized: Chapter 7 (all); Chapter 8 (Menus and ADO); Chapter 9 (all except there will be no detailed questions on 'formatting the data grid); Chapter 10 (Application Class, Error Handling and Dialog controls - nothing on Rich Text files); Chapter 11 (Common Controls - nothing on MDI applications). Material covered in class in earlier chapters may also be included. 
13 - 11/28 Thursday and Friday, November 27 and 28, Thanksgiving (Campus Closed)
14 -  12/5 Reading: Chapter 12 (all)
Lecture: Creating reusable components with classes. Properties - public  vs.  private variables and property procedures, methods, overloading., adding events to components. 
Assignment 10 (100 Points):
 Chapter 12, Program 2, pp. 495 and 496 (Class) Be sure to use an 'Imports' statement in the code of the form so that you can declare an object of the class using the class name only.
15 - 12/12 Reading: Chapter 12 (all).
Lecture: There will be no lecture this week, instead, work on programs during that time.
All assignments are due AT THE START, repeat, AT THE START of the lab on Friday, 12/12. You must be ready to demo your projects when I call your name. There will not be enough time for me to return to view your projects a second time. 
   
    Final Exam - Friday, 12/19 from 2:45 to 4:45 in ECS 404. There will be no written part, only a programming part. Possible programming questions will involve ADO and/or Classes and Objects. The exam is open book.
   

Back to Joel's Home Page


This document was last updated on:
December 9, 2003