View
 

Lab 10a: File Averages

Page history last edited by Mr. Kretsch 5 months, 1 week ago

Name: ______________________________________________________

Objective:

For loops and file input

Instructions

  1. Open your File Averages project.
  2. Add a button to your form
  3. When the user clicks the new button, your program should do the following:
    1. Open a File Open form to get a file name
    2. Once the user has selected a file, display the file name in one of the two labels.
    3. The file you should use to test the program is in R:\Basic\data\nscores.txt. The file contains a list of numbers. The first number in the list should contains the number of values in the rest of the file.
    4. Your program will read the file one line at a time and calculate the average of the values in the file.

Extra Credit

Grading

Feature  Points  Out of  Notes
File retrieval     
File input    4  
Average calculation   2  
Total   8  

 

Notes

 
 
 
 
 
 

 

 

Comments (0)

You don't have permission to comment on this page.