Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pease....Please....Please...help me with this project...I have been trying for days and need serious help.... If you can create this program In JAVA....I would greatly appreciate

Pease....Please....Please...help me with this project...I have been trying for days and need serious help....

If you can create this program In JAVA....I would greatly appreciate it....

PLEASE USE JAVA...

PLEASE USE JAVA...

PLEASE USE JAVA....and comment along the way as I will be using this to study from....

image text in transcribed

image text in transcribed

Project 0 - File Reader Project Description Implement a simple file reader using your programming language of choice. The user is queried for the filename of an input file assumed to be in the same directory as the executable reader. The reader reads a file containing a sequence of characters and outputs each character to the screen, including whitespaces, along with its line and character positions in index-one-based numbering. After reading and displaying the input file has been completed, the user is queried for a new filename to read, infinitely, until the user responds with "quit" or "exit". Descriptive code comments and version control (i.e., Git) messages demonstrating progress within the completion of the project are required. You are not allowed to use any library or module that supports regular expressions, such as re of Python, and regex of Java and C++. Your program should include three procedures (each of which may be used in later projects): 1. nextChar(): reads the next character in the input file. (This will not return anything: it will cause the next character to be stored in memory.) 2. currentChar(): returns a string containing the character that was just read. 3. position(): returns a string containing the line and column integers separated by a colon character. The main program should have a loop for reading the input and printing the characters as follows: nextChar (); while ( currentChar() != "end-of-text") \{ print ( position()+ "+ currentChar()); nextChar ();} Project 0-File Reader Every character from the text file should be outputted to its own line on the screen in the following format: currentLine(+os+currentColumn(+o+currentChar( For example, for an input file containing the following text: Hello cosC455! The reader should produce the following output: 1:11:21:31:41:52:02:12:22:32:42:52:62:72:82:9He110C0SC455

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago