There are 4 parts for the project. The question may be long to read but it’s not a heavy work because there are many examples and explanations for the each parts.*Part 1.  The first part of this project requires that you implement a class that will be used to simulate a disk drive. The disk drive will have numberofblocks many blocks where each block has blocksize many bytes. The interface for the class Sdisk should include :

Class Sdisk
{
public :

Sdisk(string diskname, int numberofblocks, int blocksize);

int getblock(int blocknumber, string& buffer);
int putblock(int blocknumber, string buffer);
int getnumberofblocks(); // accessor function
int getblocksize(); // accessor function

private :

string diskname;        // file name of software-disk

int numberofblocks;     // number of blocks on disk
int blocksize;          // block size in bytes
};

An explanation of the member functions follows :

                                                            -figure 0 (what I attached below)              

IMPLEMENTATION GUIDELINES : It is essential that your software satisfies the specifications. These will be the only functions (in your system) which physically access the Sdisk. NOTE that you must also write drivers to test and demonstrate your program.*Part 2.  The second part of this project requires that you implement a simple file system. In particular, you are going to write the software which which will handle dynamic file management. This part of the project will require you to implement the class Filesys along with member functions. In the description below, FAT refers to the File Allocation Table and ROOT refers to the Root Directory. The interface for the class should include :

Class Filesys: public Sdisk
{
Public :
Filesys(string diskname, int numberofblocks, int blocksize);
int fsclose();
int fssynch();
int newfile(string file);
int rmfile(string file);
int getfirstblock(string file);
int addblock(string file, string block);
int delblock(string file, int blocknumber);
int readblock(string file, int blocknumber, string& buffer);
int writeblock(string file, int blocknumber, string buffer);
int nextblock(string file, int blocknumber);


Private :


int rootsize;           // maximum number of entries in ROOT

int fatsize;            // number of blocks occupied by FAT
vector filename;   // filenames in ROOT
vector firstblock; // firstblocks in ROOT
vector fat;             // FAT
};

An explanation of the member functions follows :

                                                        -figure 3 (what I attached below)

*Part 3.   The third part of this project requires that you implement a simple shell that uses your file system. This part of the project will require you to implement the class Shell along with member functions. The interface for the class should include :

class Shell: public Filesys
{
Public :

Shell(string filename, int blocksize, int numberofblocks);

int dir();// lists all files
int add(string file);// add a new file using input from the keyboard
int del(string file);// deletes the file
int type(string file);//lists the contents of file
int copy(string file1, string file2);//copies file1 to file2
};

An explanation of the member functions follows :

IMPLEMENTATION GUIDELINES :See the figure 4  (what I attached below) for the ls function of Filesys.See the figure 5 (what I attached below) for dir function of Shell. See the figure 6 (what I attached below)  for main program of Shell.*Part 4.  In this part of the project, you are going to create a database system with a single table which uses the file system from Project II. The input file will consist of records associated with Art History. The data file you will use as input consists of records with the following format: The data (180 records) is in date.txt file (what I attached below)

In the data file, an asterisk is also used to delimit each field and the last character of each record is an asterisk. The width of any record is never greater than 120 bytes. Therefore you can block the data accordingly. This part of the project will require you to implement the following class:

Class Table : Public Filesys
{
Public :

Table(string diskname,int blocksize,int numberofblocks, string flatfile, string indexfile);

int Build_Table(string input_file);
int Search(string value);

Private :

string flatfile;
string indexfile;

int IndexSearch(string value);
};

The member functions are specified as follows :

See the figure 7 (what I attached below) for the main program of Shell which includes a search command.