Question: Write a class encapsulating the concept of a file, assuming a file has only a single attribute: the name of the file. Include a constructor,

Write a class encapsulating the concept of a file, assuming a file has only a single attribute: the name of the file. Include a constructor, the accessors and mutators, and methods to String and equals. Also, code a method returning the extension of the file, that is, the letters after the last dot in the file (for instance, if the file name is Test. Java, then the method should return java); if there is no dot in the file name, then the method should return "unknown extension." Write a client class to test all the methods in your class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
