CS 21b/MIS 21 under Dr. Vergara Summer 2007

Project 1 clarification:

Refer to the following sample sales report and sample sales summary.

Project 2 (due Monday, May 28, bring softcopy during your defense):

Write a Windows application for a GUI version of project 1. Support all features; as much as possible, reuse the DLL you used in project 1.

Improtant dates:

May 23: Handson Lab Exam on Forms and Controls
May 25 (430pm): Final Exam
May 25 (1-3pm) and May 28 (10am-12,1-4pm): Program defenses for Proj 1& 2 (Signup sheets will be available Tuesday afternoon); bring a certificate of authorship during your defense.

April 20

April 24

C++ Project that demonstrates multiple types (classes,enums,structs) in a single source.

April 26

Dowload this DLL File . It contains the definition for the a typical BankAccount class (methods: Deposit, Withdraw and GetBalance). It also has definitions for BankAccountList and ERRORSTATUS (for withdrawals). Using this library, write a C# program that allows the creation of bank accounts as well as deposit and withdraw transactions. Print out balances after every transaction. Use Console for input and output. Pattern your program after this EXE file. Make sure you print an error message if an account name is indicated (during a withdraw or deposit) that is curently not in the list (the Teller.exe file included here does not support this, but you have to). Submit this exercise through moodle .

April 30

Banking Solution to be used for today's lecture. For today's lecture, we carried out the following:
  1. demonstrated properties by defining Balance and Owner properties for BankAccount
  2. demonstrated indexers by defining integer and string indexers for BankAccountList

May 2

Employee Example to be used for today's lecture. For today's lecture, we carried out the following:
  1. Download the project , compile and execute. Take note of the compiler warnings and the program's output. Understand why the compiler made that warning and why the output is as indicated.
  2. You will make some revisions to this project. Refer to slide set 8 (on inheritance) for discussions on polymorphic methods and abstract classes.
  3. Revise EmpClasses.cs so that you add the virtual keyword for Employee's increase() method, and the override keyword for Manager's and Secretary's increase() method. Observe what happens with compilation and the program's output.
  4. Make the Employee class abstract and make its increase() method abstract (Delete the method's body). There will be a compiler error. Fix Prog.cs so that it instead creates two Manager objects and one Secretary object; the compiler error should disappear. Execute the program and observe its output.
  5. Create a new project in C#. Create a Shape interface with an area() and circumference() method. Create Circle and Square classes that implement that interface. In a separate .cs file, create a class with a Main() method that has an array of 4 Shapes that refer to two circles and two squares. Then, write a for loop that prints out the circumeferences and areas of the four shapes. For those who are rusty in geometry: the area and circumference of a circle: 3.14*r*r and 3.14*r*2; the area and circumference of a square: s*s and 4*s.

May 3

Code to be used for today's lecture. Try it against this database.

May 4

No classes today. Meanwhile, try the following exercise:
  1. Create an MS Access database with two tables: teacher and student. A teacher should have an id, name, department, and rank. A student should have an id, name, year level, and course. Add sample records for the tables.
  2. Write a C# program that lists the names of the teachers and the students in the database.

May 9

Download this DB Query Application that makes sending SQL statements to a database easier. The application was written by Jejomar Dimayuga (IV BS MIS). Try formulating SQL statements for these sample queries on this database .

May 10

Database to be used for today's quiz.

May 16

Lab Exercise conducted today (submitted via moodle): Write a C# console application that allows the deposit, withdrawal, and inquiry of bank accounts that connects to a single-table database.

May 17

Sample programs/databases (included in \bin\Debug of project) that demonstrate Also, for today, we will demonstrate

May 23

Handson exam