Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 

Home ] Up ]


 

The USA Program

 

1. Create an application that sorts the states of the United States into Alphabetical order.  Prepare a TOE Chart before beginning to build the interface.
.
2. Create a new application and name the project states.
2.1 The name of the form should be frmstates.
2.2 Change the Text property to “States”.
2.3 Set the WindowState property to Maximized.
2.4 Assign the filename states.vb to the form file object.
2.5 Set the project’s startup form to frmstates.
.
3. In the center of the top of the form, create a label named lbltitle and change the text property to The United States of America.
3.1 Create a graphic to hold an icon on the form.  Use Google to locate a suitable image, e.g. the American flag.
.
4. Create vertical labels for the states.
4.1 These labels need to long enough to hold 17 states.
4.2 The label boxes should be called lblstates, lblstates18, and lblstates35.
4.3 Set the Font property so it is small enough to fill the label boxes you drew.
.
5. Create buttons named btnasc, btndesc and btnexit.
5.1 In the btnasc button, use the array.sort function and, using three for loops, place the states into the labels. Be sure to first clear the Text property for lblstates, lblstates18, and lblstates35.
5.2 In the btndesc button, use the array.sort and array.reverse functions and, using three for loops, place the states into the labels. Be sure to first clear the Text property for lblstates, lblstates18, and lblstates35.
5.3 The Exit button should end the application.
5.4 The fifty states are:

 

Alabama

Alaska

Arizona

Arkansas

California

Colorado

Conneticut

Delaware

Florida

Georgia

Hawaii

Idaho

Illinois

Indiana

Iowa

Kansas

Kentucky

Louisiana

Maine

Maryland

Massachussetts

Michigan

Minnesota

Mississippi

Missouri

Montana

Nebraska

Nevada

New Hampshire

New Jersey

New Mexico

New York

North Carolina

North Dakota

Ohio

Oklahoma

Oregon

Pennsylvania

Rhode Island

South Carolina

South Dakota

Tennessee

Texas

Utah

Vermont

Virginia

Washington

West Virginia

Wisconsin

Wyoming

.
6. Click anywhere on the form and set the focus to the btnmake button.
7. Save the solution, then start and test the application. Make sure you test different values. Close the application.
.
An example of what your user interface can look like:
.
 

All content on this site is free for private use only  |  Contributions are encouraged  |  Thank you to Netfirms for the free hosting  |  If copyright content is published here or links to certain content violates some right/law, contact the Webmaster to have it removed immediately.

 

Site launched: October 2005  |  Updated: July 20, 2006  |  Link exchange  |  Site map  |  Contact us