The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
i need help creating a code for this homework and i absolutely have no idea how to do it, so if someone could help me it'd be much appreciated Â
Â
Â
CSCI1913: Introduction to Algorithms, Data Structures, and Program DevelopmentComputer Laboratory 5October 11–12, 20160. Introduction.Most modern operating systems, like Unix and GNU/Linux, store fles indirectories.They can have directoriesnested inside those directories, and still more directories nested inside those, etc.Filescontaining data can alsoreside in any directory, no matter how deeply it is nested. Also, fles can have optionaltypesthat tell what kindoF data they contain.APathnamegives a sequence oF directory names that tells how to fnd a fle in a nested series oF directories.In this laboratory assignment, you will implement a Java class that represents a pathname. Among other things,your class will have a more interestingequalsmethod than was discussed in the lectures.1. Theory.In Unix-like operating systems, a pathname starts with ‘/’, Followed by one or more directory names, separatedby ‘/’s. The pathname ends with the name oF a fle. ±ollowing that, there can optionally be a ‘.’, Followed by thename oF a type that tells what the fle contains. Each pathname gives instructions about how to fnd a fle in aseries oF nested directories. ±or example, the pathname/home/jim/csci1913/final.txtgives theseinstructions.1. Start at a special root directory/.2. In the root directory is another directory,home. Go inside it.3. Inhomeis yet another directory,jim. Go inside it.4. Injimis still another directory,csci1913. Go inside it.5. Incsci1913is a fle namedfinal.6. The flefinalhas typetxt, so it contains text.Pathnames in a real operating system can have many directories, but the ones you will implement here can haveat most 10.2. Implementation.In this laboratory assignment, you will write a Java class calledPathnamethat represents a pathname. Your classmust have the Following private variables, so its frst Few lines must look like this. To simpliFy grading, you mustuse the same names For these private variables that are shown here. (The three dots mean that some parts oF theclass are not shown.)class Pathname{private intdepth;private String [] directories;private Stringname;private Stringtype;⋮}
Attachments:
-----------