CSE 461 Lab 3 solved

$35.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (5 votes)

This laboratory is designed to get you started with the the second part of the project.

  1. Open your source file and write or copy the code for the class template for the Sdisk.
  2. Now, copy the interface for the filesystem :
    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<string> filename;   // filenames in ROOT
    vector<int> firstblock; // firstblocks in ROOT
    vector<int> fat;             // FAT
    };
    
  3. Create function stubs (functions with no code) for the class functions.
  4. Work first on the Filesys constructor where you have to create the ROOT directory and the FAT.
  5. Work next on the fssynch that writes the Root and FAT to the disk.