
C# ПІДРУЧНИКИ / c# / Premier Press - C# Professional Projects
.pdf
This page intentionally left blank
|
|
Y |
|
L |
|
|
F |
|
|
M |
|
A |
|
|
E |
|
|
T |
|
|
Team-Fly®

PART V
Professional Project 3

This page intentionally left blank

Project 3
Creating a
Creative Learning
Project

Project 3 Overview
In the preceding two projects, you looked at developing Windows applications for a car maintenance company and creating an employee records system application. In this project, you will learn to create another Windows application for a chain of bookstores. This Windows application is called Creative Learning after the name of the chain of bookstores.
The Creative Learning application contains a Windows form that validates the data entered by a user in a Word document. In this project, you will learn to create a Windows form that interacts with a Microsoft Word document. In addition, any errors produced while processing a Word document are logged in Windows Event Viewer. Therefore, you will also learn to access Event Viewer from a Windows form created in Visual Studio .NET.
I will be discussing the creation of the Windows form in the following chapters. The next chapter covers the case study and design of the Creative Learning application.

Chapter 15
Project Case
Study and Design

334 Project 3 CREATING A CREATIVE LEARNING PROJECT
In this chapter, I will discuss the case study of the Creative Learning project. In addition, you will be introduced to the project life cycle of the Creative Learning project.The project life cycle includes analyzing the requirements of Creative Learning. Finally, you will create a high-level and low-level design of the Creative
Learning application.
Case Study
Creative Learning is a group of publishers located at New York. Recently, the organization has moved into retailing the books published at the publishing house. To start with, the organization has established bookstores at six locations in New York. However, the organization aims at increasing the number of bookstores in the forthcoming years. In addition, the organization is looking forward to establishing bookstores across all major states in the United States.
To meet the competition in the retail market, the organization has decided to monitor the sales data of all six bookstores for a few months.The management of the organization has decided to develop an application that will track the sales record of each bookstore on a daily basis.The analysis of the tracked data will give the management a fair idea of the performance of each bookstore.
To develop and deploy the application, the senior managers have appointed a development team of three people. The development team comprises the project manager, John Frye, and two application developers, Larry Barrett and Sam Jones. The development team has decided upon a strategy to build the application. To understand the strategy, you first need to understand the sales process at the bookstores.
All of the six bookstores in New York are connected to a main server over a LAN. The main ser ver is located at the head office of Creative Learning in New York. Whenever a book is purchased from any of the bookstores, the salesperson issues a cash memo to the customer. A cash memo is a Word document that contains details about the purchase made. The salesperson then sends the copy of the cash memo to the main server over the LAN.

PROJECT CASE STUDY AND DESIGN |
Chapter 15 |
335 |
|
|
|
|
|
An operator at the head office makes an entry of each cash memo into an XML document. At the end of the day, the data in the XML document is analyzed to determine the sales from each bookstore. This data would then be analyzed at the end of the month to decide the performance of the bookstores.
The development team at Creative Learning has decided to automate the entire process. When a salesperson issues a cash memo to a customer, the salesperson makes a copy of the cash memo in the specified directory on the main server. Then, on the main server, the format of the cash memo is checked for accuracy. Once the format is validated, the entry of the cash memo will be made into the XML document.The data in the document can then be easily analyzed to see the performance of each of the bookstores.
To carry out the entire process, the development team plans to create a Windows application and name it the Creative Learning project.The following section discusses the stages in the life cycle of the Creative Learning project.
Project Life Cycle
You looked at the phases of a DLC (development life cycle) of a project in Chapter 7, “Project Case Study,” in the section “Case Study.” Therefore, in this chapter, I will not discuss the entire life cycle of the project. However, I will discuss the analysis of the organization’s requirements from the development team at Creative Learning. In addition, I will discuss the design of the application created by the development team based on the analysis of the organization’s requirements. You, as a part of the development team, will analyze the requirements of Creative Learning and will create a design for the application based on the analysis.
Analyzing Requirements
To find a solution to a customer’s problem, it is essential that you analyze the requirements of the customer in detail.This is done in the analyzing requirements phase of the project life cycle. After analyzing the customer’s problem in detail, you create a plan for developing the application. This analysis of the customer’s problem is based on the problem statement stated by senior managers and the information gathered by the development team.

336 Project 3 CREATING A CREATIVE LEARNING PROJECT
In the case of Creative Learning, the problem statement, as stated by senior managers, is, “Creative Learning needs to automate the process of analyzing sales data of each bookstore.”
Upon analyzing the problem statement, the development team defined the following list of tasks that Creative Learning needs to do:
The organization needs to analyze the sales data of each bookstore.
The organization needs to automate the data analysis process.
Based on the analysis results, the organization will determine the performance of each bookstore.
Based on the performance of bookstores, the organization plans to move ahead with its growth plans.
To provide a solution to the aforementioned problems of Creative Learning, the development team plans to create a Windows application with the following features:
The application will receive a copy of the cash memo from a directory on the main ser ver at the head office of Creative Learning.
The application will validate the format of the cash memo.
If the format of the cash memo is incorrect, the application will create an event log.
Alternatively, if the format of the cash memo is correct, an entry for the cash memo will be created in an XML document.
High-Level Design
Based on the plan of the Windows application, the development team created a design of the Windows application in the high-level design phase. The design of the Creative Learning application includes creating the interface for the Windows form used in the application.
The Creative Learning application consists of a Windows form called Creative Learning. Figure 15-1 shows the layout of the Creative Learning form.

PROJECT CASE STUDY AND DESIGN |
Chapter 15 |
337 |
|
|
|
|
|
FIGURE 15-1 Layout of the Creative Learning form
To create the layout of the Creative Learning application, as shown in Figure 15-1, you need to include a tab control and two button controls.You have learned about button controls in Chapter 8, “Windows Forms and Controls” in the section “Types of Windows Forms Controls.”The following section discusses a TabControl control in detail.
The TabControl Control
A TabControl control is a Windows forms control that you can use to create multiple tabbed pages in a window or a dialog box. For example, a tab control can be used to display multiple-options pages in a wizard. You can use the arrow keys to shift from one tabbed page to another. A TabControl control has a TabPages property that you can modify to add tabbed pages to the tab control. You will learn about adding tabbed pages to a tab control later in this chapter.
To create a tab control in Visual Studio .NET, you can drag the control from the Windows Forms toolbox to the form. Figure 15-2 shows the TabControl control in the Windows Forms toolbox.