Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA ONLY File Input and Output Chapter 1. It is a well-known phenomenon that most people are easily able to read a text whose words

JAVA ONLY

File Input and Output Chapter

1. It is a well-known phenomenon that most people are easily able to read a text whose words have two characters flipped, provided the first and last letter of each word are not changed.

*For example, I dn'ot gvie a dman for a man taht can olny sepll a wrod one way. (Mark Twain)

-Write a program with a method scramble(String word) that reads the contents of a file with a paragraph in it and constructs a scrambled version of the paragraph, randomly flipping two characters other than the first and last for all words greater than length 3.

2. A spreadsheet file can be stored as a comma separated file. For instance if a file called data.csv had the following in it:

name, quiz1, quiz2, quiz3, hw1, hw2, hw3, midterm, final

bill,8,9,10,50,45,43,88,93

jill,9,9,10,50,48,40,90,91

gill,6,5,7,38,22,40,70,73

will,8,9,9,40,45,43,83,94

totals,10,10,10,50,50,50,100,100

It would display in a program like Microsoft excel appropriately.

a) create a file called data.csv with this data on your hard drive.

b) read the file into a program calculating each students final percentage.

c) have the program write a new file with an extra column containing the final percentage for each student, a column heading for the first row, and the last row can end with 100 for its percentage.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

l Diagram the sequence of a typical selection process.

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago