CIS 234N C# Programming

Part 4 Assignment

 

Here you get a choice of doing one of two projects. The first one is something I've come up with. Or you can choose the alternate project. In either case, you should run all of the code samples in the Part4 folder (there are a lot of them.)

 

To complete either of these projects, you should study Part 4 "Working With Windows Applications" in the textbook which is chapters 18-23. Also, see the code samples in the Part4 folder.

 

First Project:

 

Here is a project you can to that uses some of the topics covered in this part of the course. To do this project, you'll want to use these projects for help (they are in the Part4 folder): 

 

 

 

Create a Windows application that has two forms. Form1 is the main form. It contains a menu with an item named DataEntry. Clicking the DataEntry item causes the second form to be displayed, named the DataEntryForm. On the DataEntryForm are two textboxes: LastName and AccountNumber.  The user can enter anything for LastName but you must validate that the AccountNumber is only numeric (See the TextBoxValidation document in the Part4 folder to see how to do this.)

 

When the main form displays the DataEntryForm it should send it an object (see the TwoFormsExample for how to do this.) The object should contain three fields: LastName, AccountNumber, and a boolean field ValidAccountNumber.

 

The DataEntryForm should take the data from its textboxes, place it in the object and make sure to set the ValidAccountNumber field correctly.

 

When the main form regains control, extract the fields from the object and display them. You can use any means to display: textboxes, listbox, or labels.

 

 

Alternate project:

 

Some of you may find the above project too easy or not interesting. If you do I am open to having you create any project that you wish, using material from this part of the course. It should be a Windows Application though, not a console application. Perhaps you have been thinking about a project you want to do at home or for work. Feel free to start in on it. If you choose this option, be sure to indicate when you submit it that you are doing your own project. If you want to discuss a proposal with me, please feel free to do it in class, by phone, or on the course website email.  This is a chance to have fun with a project of your choosing. If you choose this option, you don't have to do the project that is described above.  Have fun!