In this lab, you will add the CAccount class to the StateUBookstore project. This component will use ADO code to access the StateUBookstore database. The component will verify that the student has enough available credit to purchase a book.
To see a demonstration of the lab solution, click your modem speed or Download below.
![]() ![]() ![]() ![]() |
(Requires the Microsoft Windows Media Player.) |
Estimated time to complete this lab: 120 minutes
To complete the exercises in this lab, you must have the required software. For detailed information about the labs and setup for the labs, see the Labs section in this course.
After completing this lab, you will be able to:
Before working on this lab, you should be familiar with the following:
The following exercises provide practice working with the concepts and techniques covered in this chapter:
In this exercise, you will create the CAccount class that handles the financial transaction for buying a book.
In this exercise, you will write code to initialize the CAccount class. You will also implement the Authorize method of the CAccount class.
In this exercise, you will implement the Debit method of the CAccount class.
In this exercise, you will add code that uses the CAccount class you've created. This class will be used when a student attempts to buy a book from the State University Bookstore.
In this exercise, you will test the lab solution using specific scenarios that will test different cases that the CAccount component should handle.