0% found this document useful (0 votes)
57 views3 pages

Oshin Mizuki OOPD Lab 3

Uploaded by

vikashjhaabc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views3 pages

Oshin Mizuki OOPD Lab 3

Uploaded by

vikashjhaabc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Oshin Mizuki Bits Id: 2025we0925

Course ID: CSIWZXXXX Lab No: 3

FileHub – Smart File Manager


A tech startup is building FileHub, a command-line-based smart file manager in
Java. It aims to perform real-time file reading/writing, analyze text, reverse content,
detect palindromes, sort files by word count, and support both character and binary
data.

As a junior developer on the team, you are assigned to implement the core
components of the system.

Task to be performed:

Q1. File I/O using Character Streams & Command Line Arguments

Q2. Binary File Handling and Byte Streams

Q3. String Manipulation and Utility Methods

Q4. Sorting and Handling Arrays

Q5. Polymorphism and Interfaces

Answer: To avoid writing the same code again and again, we created separate Java
class files with Reusable code. This helps us keep the code clean and avoids
repeating the same logic multiple times.

These Reusable class files are made as given in Questions from Q1 to Q5:
➢ Analyzer.java: Interface for analysis operations
➢ BinaryAnalyzer.java: Handles binary file analysis
➢ FileData.java: Stores file metadata (name and word count)
➢ TextAnalyzer.java: Performs text analysis, string manipulation, and statistics
➢ StatusPrinter.java: Utility class for logging status messages
➢ Main.java: Main class to run the application

Additional files used for demonstration:


➢ File1.txt: Sample text file
➢ File2.txt: Sample text file
➢ BinaryText.bin: Sample binary file
Name: Oshin Mizuki Bits Id: 2025we0925
Course ID: CSIWZXXXX Lab No: 3

Required Code File:

1) Code of Analyzer.java:

2) Code of BinaryAnalyzer.java:
3) Code of FileData.java:
4) Code of Main.java:
5) Code of TextAnalyzer.java:
6) Code of StatusPrinter.java:

File used for demonstration:

File1:

File2:

BinaryText.bin

OUTPUT:

OUTPUT of Q1:

OUTPUT of Q2:

OUTPUT of Q3:

OUTPUT of Q4:

OUTPUT of Q5:
Name: Oshin Mizuki Bits Id: 2025we0925
Course ID: CSIWZXXXX Lab No: 3

Additional Screenshot’s:
Lab Usage:

Files Created:

You might also like