homeworkWeek2 - 10 5 6 9 20 21 22 30 56 78 123 5 1 2 3 4 5...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Loyola College Computer Science Dept Spring 2006 CS631: Computing Fundamentals II Homework - Java review and recursion Due: Next class period, Feb. 3 rd Assignment: 1. Page 164, number 3 2. Page 164, number 4 3. Page 165, number 5 4. Page 165, number 11 5. Page 170, programming problem 4 6. Write a program to generate a text file of N lines of random integers. The file name may be embedded in your program. The output should look like this, with the number of items at the first of each line:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10 5 6 9 20 21 22 30 56 78 123 5 1 2 3 4 5 8 56 67 78 89 99 101 7. The objective of this exercise is to read in the file from #6, but use it to practice text input. Write programs that: a) Read the file one character at a time and prints each to output. So, the output for the first line above should start: 1 0 blank 5 6 b) Tokenizes the input to output 10 5 6 c) Finally, converts the values to integers and generates the sum of the data (not the first value...
View Full Document

This note was uploaded on 10/21/2009 for the course CS CS 631 taught by Professor Dr.rogerd.eastman during the Spring '09 term at Loyola Maryland.

Ask a homework question - tutors are online