Docsity

Application Programming for Information Systems - Lab Work | IST 256, Lab Reports of Information Technology

Toggle sidebar
bg1
IST 256
Lab Week 13, Part 2 – November 19, 2008
1. Extending a Program with Record Structures
Use the program that you wrote in the last lab:
a. Go to the C: drive and make a folder at the top level with your name or userid,
something like: C:\njmccrac
b. Copy your StudentRecords project from the H: drive to the C: drive.
c. Open Visual Studio and go to create a open project/solution When this Dialog box
opens, pick the version of the StudentRecords on the C: drive.
Since we are modifying the StudentRecords program from Monday’s lab, make sure
that you have printed that version before you modify it today.
d. Open the data file “students.txt” from your project in the
C:\name\StudentRecords\bin\Debug in your C: drive folder.
Open the data file, “students.txt” in Notepad, and on every line add address information
for each student. Assume that an address has two parts: the name of a dorm and the
room number. So each line of the file should look something like:
Alex, M, 20, 73, 3.06, Dellplain, 326
Check your file that each line has 7 items, separated by 6 commas.
e. Extend the form that we did last time by adding a button to search for a student’s name
(given in a textbox) and a label to display their information. The form will look
something like:
|__Read Student Records__| Status (label)
|__Number__| Number of Females (label) Number of Males (label)
|__Find Oldest Student__| |_______________| (textbox for result)
|__Type Student Name for Search:__| |_______________| (textbox for input)
Student Result: (Label)
|_Close_|
f. Click on the new button to add its procedure heading to the program.
Make a hierarchical record structure: at the top of the program, add a record structure for
the dorm address and add an address field to the student record structure.
pf2

Partial preview of the text

Download Application Programming for Information Systems - Lab Work | IST 256 and more Lab Reports Information Technology in PDF only on Docsity!

IST 256

Lab Week 13, Part 2 – November 19, 2008

1. Extending a Program with Record Structures

Use the program that you wrote in the last lab: a. Go to the C: drive and make a folder at the top level with your name or userid, something like: C:\njmccrac b. Copy your StudentRecords project from the H: drive to the C: drive. c. Open Visual Studio and go to create a open project/solution When this Dialog box opens, pick the version of the StudentRecords on the C: drive.

Since we are modifying the StudentRecords program from Monday’s lab, make sure that you have printed that version before you modify it today.

d. Open the data file “students.txt” from your project in the C:\name\StudentRecords\bin\Debug in your C: drive folder.

Open the data file, “students.txt” in Notepad, and on every line add address information for each student. Assume that an address has two parts: the name of a dorm and the room number. So each line of the file should look something like: Alex, M, 20, 73, 3.06, Dellplain, 326

Check your file that each line has 7 items, separated by 6 commas.

e. Extend the form that we did last time by adding a button to search for a student’s name (given in a textbox) and a label to display their information. The form will look something like:

|Read Student Records| Status (label)

|Number| Number of Females (label) Number of Males (label)

|Find Oldest Student| |_______________| (textbox for result)

|Type Student Name for Search:| |_______________| (textbox for input)

Student Result: (Label)

|Close|

f. Click on the new button to add its procedure heading to the program.

Make a hierarchical record structure: at the top of the program, add a record structure for the dorm address and add an address field to the student record structure.

Now change the File Input button to read the dorm address data items from each line and to put them in the new dorm address fields.

Finally, write code for the new button. It should read the student’s name from the new TextBox. It should then have a loop that goes through the student array and finds the array element with that name. Then the fields from the student record should be displayed as the result in the new label.

Test your program.

Print and hand in the new version of the StudentRecords program and the students.txt file.

***************** At the end of lab ********************

Go to the C: drive where you put your folder with your name. Copy and paste this entire folder to the H: drive under your IST256 projects.

*************** Don’t forget to save your work! ****************