You are to write a program that reads a file that recursively lists the files in a directory. There are four classes:
ListNode, List, File, and Directory. The Directory class is derived from the File class. To allow for polymorphism, the
List declared in main() will hold File*, not File. As the program reads the file it will use the first letter to determine
whether it should create a new Directory or new File. It then can insert into the list the pointer. For find, it will need to
create a File based on the user input, and then pass the address of the File to List::find(). There is a simple way to
repeatedly create such a File inside a loop without calling new. See if you can figure out how I did it.
For this assignment, I am not going to give you step by step instructions for the development of the program. It is
time for you to develop a program on your own. I suggest that you develop from top down using stubs.
1. main() calls a read function, and then enters a loop. main() prints the “Not found” if [login to view URL]() returns false.
2. ListNode class is a template class with both a prev and next ListNode<T> pointers. Because the T data stored is a
pointer to an object that is created using new, it will be up to the destructor of ListNode to delete it.
3. List class is a template class with ListNode<T> *head, and *curr, that is sorted based on the overloaded comparison
operators of the T class that compare the names of the Files.
3.1. To get things up and running, initially I would just use the List as a single linked list. However, it is worth five
points of the fifty to have curr move forward and backward within the list.
3.2. Since the list knows that it will always be storing pointers as the data in the ListNodes, it will usually dereference
the data when using it. Be careful when comparing dereferenced T’s that the one in the list is always on the right
side of the comparison! This permits the operator of the proper class, File or Directory, to be called.
3.3. There is five points extra credit if you write both the find(), and insert() without using any additional
ListNode<T> pointers, e.g. the ptr and prev used in lecture.
3.4. The methods are: a constructor, a destructor, bool find(), void insert(), and void print().
4. File class has only a protected char *name for data that must be dynamically allocated. The code for each of the
methods is no more than three lines long!
4.1. The non-virtual methods are all public: a constructor, and const char* getName().
4.2. The virtual methods are: a destructor, bool find(), void insert(), operator==, operator<, and operator>.
4.2.1. The find() method just prints the name of the file.
4.2.2. The insert() method does nothing!
4.2.3. The comparison operators just use strcmp().
5. Directory class is publicly derived from File, and also contains a List<File*>, named files. Thus, main’s List is actually
a List of Lists!
5.1. The methods it has are: a constructor, a destructor, and versions of all the virtual methods of File.
5.1.1. find() prints the List of the Directory if it’s name is a perfect match, otherwise it calls the find of its List.
5.1.2. insert() does nothing if its name is a perfect match, otherwise it calls the insert of its List.
5.1.3. The comparison operators are used by List, and use strncmp() to compare the name of the directory with the
beginning of the name of the data being compared. They are a little tricky. For example, “40/p4 ==
40/p4/private” is true because the p4 is followed by a ‘/’ in the second operand, but “./handin/p4/davis ==
./handin/p4/davistemp” is false because the “davis” in the second operand is neither the end of the string,
nor followed by a ‘/’.
[login to view URL]~ssdavis/40/[login to view URL]
Hello
I'm interesting your project very well
I'm a Good C++, OS, Algorithm expert.
I understand your req exactly.
I m quite well experienced in these jobs.
Let's go ahead with me
I want to service for you continously.
Thanks
Hello...I can do it this weekend... I have 22 years loving c++, with master and PhD in computer science. Look at my profile...I should be one of the best options for this project. Best regards!
Hi,
I am very much familiar and experienced in C++ programming with good OO design with data structures and algorithms. I can help you complete the assignment as per given specs. Please contact me as soon as possible if you need my help.
With Regards,
Koustav
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similiar to a compiler, and is very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
Greetings,
I'm a specialist in C++ and OOA/OOD, UML etc; and teach C++ to engineers world-wide.
Nearly worked for Microsoft , many times, in their VIsual C++ teams.
Can I be of assistance, perhaps? :)
Cheers
Hi, I am experienced in the things this assignment requires (C++, object oriented programming, operator overloading, inheritance, templates). I understand this assignment and can deliver it within a couple of days.
Hello there!
I am proficient in C++ and I can complete this project for you. Would you be able to send me the xecutable and other source files in ~ssdavis/40/p6, as mentioned in the assignment document, bullet point 5, in order to be able to test the program? Thank you in advance.
Best Regards
Alex
hello
pls ping me on freelancer chat to discuss more on details.
you may check my profile for my work and exp in c++
looking fwd yo hear back from you.
regards
sandip
Hello. How are u.
I saw your description
I have done several project like this.
I'm an expert in Data Structures and Algorithms.
And I know Java ,C/C++, C# and Python well.
I'm interested this Project.
I want to discuss with you about this project.
If it's possible,please contact me and explain more detail.
I wait your good reply.
Bye.
I have very good experience working with all these types of stuffs done a lot of project on hackersrank and also independently. I can do your work to 100% of yours satisfaction with yours help. I have read your assignment completely and can deliver it in best way. Inbox for more details. Thankx
I have been developed C,C++ programming for long time with a old customer without freelancer.
This is first for me on freelancer.
If you contact me, you will become a first new customer on freelancer.
I hope so . Please contact me.
let's keep in touch.
I have a lot of experience in writing big projects like this in c++ and this should not be a problem. Hopefully you can contact me so we can discuss this further. Looking forward to hearing and cooperating with you.
My name is Mike and I’m from UK. I work with individual clients and also provide outsourcing services for a number of UK and USA based agencies. Your project description sounds interesting to me and I do have skills & experience that is required to complete this project. I can show you some examples of my work. Please contact me to discuss your project.
I am an undergrad computer science student of an institute of national importance in India. I am well versed in C/C++ programming. Your work will be done in least time for the least money.
I've worked extensively on C, C++ and VC++ n past and have received appreciations from customer about the work I created.
For this assignment also, my work will be best, 100% quality work on time.
Dear customer,
In the last 3 years I have worked mainly developing C++ code. I could provide a well organized code including explanation comments, accordingly to the requirements. Small updates could be provided further on request, and also additional explanations.
Best regards,
Catalin Bujdei