Project1 - Electrical Computer Engineering Department...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2010 ENEE140 Dr. Gang Qu Project 1: A Simple Data Analyzer Posted: Sunday, March 7, 2010. Due: 11:59PM, Monday March 29, 2010. Project Objective: 1. get familiar with the process of completing a programming project in UNIX. 2. learn the procedure of how to implement a project. 3. learn how to develop algorithm to solve a problem efficiently. 4. learn the basic command line argument and file I/O. 5. use basic if , if-else and switch statements for program selection. 6. use array and basic for loop for repetition. 7. learn simple data management. Project Description : In this project, you will design and implement a program that reads in a list of integers from a text file, print them out to another file in a formatted fashion; analyze the data and draw a “bar chart” to show the frequency of the integers in the list. General Requirements: 1) Your program will be run by typing the following command prompt (assuming that the executable of your program is named a.out): a.out inputFile outputFile The names of the files inputFile and outputFile can be any legal file names in the same directory of a.out . Use command line argument and read in these file names from the above command prompt. 2) The input file contains a list of up to 100 integers. (hint: This suggests that you could store all the input data in an integer array of size 100.) 3) Your program must print the following to the output file: the list of numbers with 5 in each line, a “bar chart” on the frequency of the numbers. See below for details. Input/Output 1) The input data file: Format: each line has exactly one integer. The number can be positive, negative, or zero. Duplicates are allowed. Below is a sample input file with 8 integers.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Project1 - Electrical Computer Engineering Department...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online