CS 21b/MIS 21 under Dr. Vergara


  1. Angeles, Marc
  2. Dimayuga, Jejomar
  3. Consolacion, Karla
  4. Yu, Dorothy
  5. Dijan, Rachel
  6. Alandy Dy, Queen
  7. Chow, Charles
  8. Zamudio, Rowena
  9. Abellera, Denise

FINAL EXAM: MAY 31, 4:30, F227

April 26:

  1. Download this DLL File and write a program that uses this library (it contains definitions for Pie, IceCream, and Dessert). Here is the code snippet from yesterday's demo for your reference
            Dessert d = new Dessert(Pie.Apple, IceCream.Vanilla);
  2. Dowload this DLL File . It contains the definition for the a typical BankAccount class (methods: deposit, withdraw and getBalance). Using this library, write a C# program that creates a single bank account with an initial balance, and repeatedly carries out deposit or withdraw transactions. Use Console for input and output. Pattern your program after this EXE file. Submit this exercise through moodle .

April 27:

May 2:

  1. Take Quiz # 4
  2. Download this C# 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.
  3. You will make some revisions to this project. Refer to slide set 8 (on inheritance) for discussions on polymorphic methods and abstract classes.
  4. 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.
  5. 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.
  6. 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.
  7. Wait for your instructor. He will arrive by 5:30. Be prepared for another quiz on the above exercises.

May 4:

  1. place this database in a folder that you are familiar with
  2. create a C# project with this program
  3. update the DB connection string to refer to thr right folder
  4. make sure you add the references System, System.Data, and System.XML before you compile the project
  5. compile and execute the program
Answers to questions brought up today:

May 10:

Database to be used for quiz

May 15

Sample Reports for Project 1

May 19 handson exam:

  1. Download and execute the following application with database , to give you an idea of what is expected of you for this hands-on exam. The database is an employment database with a department (dept code,name,number of employees) table and an employee (id, name, salary, dept) table. The application allows you to edit and view department information and view employees under a department.
  2. You have the option to start with this C# project which already supports the edit operation (the database has already been placed in the bin\Debug directory of the project). The edit operation is not part of this hands-on exam.
  3. Hands-on exam requirements:
  4. Submit a zip file of the project and submit through moodle

May 22

On Binding Sources and DataGridView objects:

May 24