ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 8.00

Write a class called FileOperations

Write a class called FileOperations that accepts a string value in a variable called str which represents the name of a text file residing on an external storage device. Provide the following:

a)     A constructor that accepts the string str, representing the file name, and creates a LineNumberReader object.                                                                                     [ 1 mark]

(b)    A mutator method that reads the file line by line until the file is empty.                  [ 2 marks]

(c)     An accessor method that determines if the actual file exists.                                  [ 1 mark]

(d)    An accessor method that returns the number of bytes in the file.                          [ 1mark]

(e)     An accessor method that returns the name of the file.                                          [ 1 mark]

(f)      The declaration of appropriate variables and use of Exception where necessary.    [ 2 marks]

 

Note :– a test class is NOT required

 

 

 

 

Exceptions identify errors that arise in your program. Name the two categories of exceptions that are derived directly from Throwable and differentiate between them.

Answers

(11)
Status NEW Posted 09 May 2017 12:05 AM My Price 8.00

-----------

Not Rated(0)