You are hired by SkyElectric Inc., Islamabad for a sub product operating system used in their smart solar systems. The operating system is deployed in these smart solar systems just for debugging purposes and it maintains only the files classified in different categories. Voltage Log, Power Log is to name a few. Currently in their operating system they don’t have any file management system. The task assign to you from SkyElectric Inc. is to develop a File Directory Tree Shell for their operating system. The support team have some diverse people and they want to code such that they are able to see the file directory tree in Tree View (level order). The team also want a quick search interface to search a specific file/directory (using Binary Search Tree). The team also want to be able to merge directories of the given sub tree or tree, create, or delete file/directory. Operations and Details The Directory Tree You are required to generate an N-ary Tree from the root directory “/” (see log.txt) (attached with the assignment statement and should be placed in source folder) such that: • The root of the tree becomes the “/” directory • The sub directories and files become child nodes of the root

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

You are hired by SkyElectric Inc., Islamabad for a sub product operating system used in their smart solar systems. The operating system is deployed in these smart solar systems just for debugging purposes and it maintains only the files classified in different categories. Voltage Log, Power Log is to name a few. Currently in their operating system they don’t have any file management system. The task assign to you from SkyElectric Inc. is to develop a File Directory Tree Shell for their operating system. The support team have some diverse people and they want to code such that they are able to see the file directory tree in Tree View (level order). The team also want a quick search interface to search a specific file/directory (using Binary Search Tree). The team also want to be able to merge directories of the given sub tree or tree, create, or delete file/directory.

Operations and Details

The Directory Tree

You are required to generate an N-ary Tree from the root directory “/” (see log.txt) (attached with the assignment statement and should be placed in source folder) such that:

• The root of the tree becomes the “/” directory

• The sub directories and files become child nodes of the root

• Files should always be the leaf nodes

In order to satisfy the support team, you are required to display the directory tree in Tree form (level order traversal). An Example Tree form and output are as followed

In the above constructed BST, it’s easy to navigate to a specific file/directory. The asci of first character of the search string should be compared to the asci of character in BST and it can be easily decided to go left or right. Once the search string matches the file/directory names the function must return list of direct addresses (duplication allowed) from the directory tree (listNode structure is provided in Roll_no.h file).

Note: “/” is not included in BST. And you can’t create duplicate directory of “/”.

Trees Operations

• File writing

o Level order Output of Tree directory (Figure02)

o In-order, pre-order and post-order of BST.

Note: File writing will be used for testing purposes.

• Insert File/Folder

The support team should be able to insert a specific node in the directory tree, this should update the quick search tree and actual directory accordingly. You have to provide absolute path for insertion.

• Delete File/Folder

The support team should be able to delete a specific node from the directory tree, this should update the quick search tree and actual directory accordingly.

Note: “/” directory can’t be deleted.

• Merge Folders

The support team should be able to merge two directories (two nodes in directory tree and in actual). Merging can be done by copying all the content of first directory into second directory. This should update the quick search tree.

• Search (Already Discussed in Quick Search Tree)

 

 

 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education