Get quote & make Payment
Assignment help, C/C++ Programming
It''s that spooky time of year when the dead walk the Earth, things go bump in the night, and the
Centers for Disease Control (CDC) recognizes the need for zombie preparedness
Like the CDC, we computer scientists must also plan for dire times. We may even be forced to behave as the ''Cycle Sluts'' did in the cult classic ‘Chopper Chicks in Zombietown’
). A movie that yours truly even tried out for a part in (as a zombie, not a chopper chick), but I digress.
Regardless, in such dire times, we may be forced to rely upon our circle of friends to get us through. Assuming that you actually have a circle of friends and that your friends and family are not the same and that you probably have a list of business associates (dentist, car insurance agent, etc) and that you may even have a list of former friends (that you want to avoid like the plague - because all they want is to borrow money, or have become zombies!) you might find that a doubly-linked FAT would prove useful to manage your circle of friends. So, for this homefun assignment, let''s write one! Just in case the end really is nigh…
Note the figure below:
* For what we are about to code next, we must enter quietly into the realm of genius.
Our directory (an array of structs) must contain a string (char) for the name of the “circle” and and int pointing to the starting point in the FAT. You can fix the directory at length 10 (no need for malloc/calloc). Our FAT (an array of structs) must contain two strings (char and char) for the name of the person, their phone number, and two ints pointing to the next block and the previous block. Note in the figure that a negative previous block tells you what entry in the directory you should refer too. You can fix the FAT at length 100 (no need for malloc/calloc).
* Compile! Do you hear me? Give my code... LIFE!
To populate your circle of friends open the hw7.data file and read in the contents. The file format is as follows:
circle_membership name phone_number op_code
Family Vlad 2181234 a
Family Cullen 2615555 a
Friends Morticia 2357879 a
Friends Ophelia 2339001 a
Enemies Smurf 2615595 a
Search Morticia 2357878 q
The circle_membership will be a string. The name will be a string. The phone number will be a string (e.g. 7774013). The op_code will be a character (‘a’, ‘d’, ‘q’), where ‘a’ indicates that you should add this person to the FAT (and possibly add the circle_membership to the directory), ‘d’ indicates that you should delete this person from the FAT (and possibly the circle_membership from the directory), ‘q’ indicates a query and means that you need to traverse the list and find all other persons who belong to this person’s circle_membership and print their names and phone numbers. Note that actions requiring a query will have the circle_membership set to search.
* Ah! You do not know the weight and length of the assignment you bear yourself! It is as full and as long as HW6 and you will labor on it these next fourteen eves. It is a wondrous assignment. Ohhhh, it is a ponderous assignment!
For example: What do you do when you are inserting the first name of a circle? What about when you are deleting the last name of a circle? What about deleting a non-existing entry? What about querying a non-existing entry? Test your code for all of these cases.
You also need to provide output that proves your program works. After the last data item has been processed, your program must display the text “DIRECTORY” followed by the contents of the Directory (array index, circle name and start block) where each entry is on a separate line. In addition your program is only to print output for directory entries that have actual data. Follow this output by a blank line. Your program must then display the text “FAT” followed by the contents of the FAT (array index, name, phone, previous, next – in this order!) where each entry is on a separate line. In addition your program is only to print output for FAT entries that have actual data.
Posted Date: 10/26/2012 11:48:07 AM | Location : United States
Ask an Expert
Assignment help, Assignment Help, Ask Question on Assignment help, Get Answer, Expert's Help, Assignment help Discussions
Write discussion on Assignment help
Your posts are moderated
Write your message here..
Please help me, y=2x-3?_(i=1)^(n+1)¦?i+2?
Serial programming, Hi I''m trying to connect to CISCO router using termios...
Hi I''m trying to connect to CISCO router using termios. So I decided to have two threads one for reading data and the other one for writing data. The problem is that I have to add
Classes, what is classes?
what is classes?
Pro, i need to do my home work
i need to do my home work
I need asp .net facebook app project completion, I need Asp .net Facebook a...
I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.
Area under curve, Write a program to find the area under the curve y = f(x)...
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.
Write a program that simulates a simple calculation, The program reads two ...
The program reads two numbers and a character (operator). If the character is "+" then sum is displayed. If it is "-"then difference is displayed. If it is "*" then product is disp
What should one throw?, A: C++, unlike only about every other language with...
A: C++, unlike only about every other language with exceptions, is extremely accomodating while it comes to what you can throw. Actually, you can throw anything you akin to. That b
Private vehicle renting system, how to create?
how to create?
Define a class to model a banking system, Explain a class to model a bankin...
Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.