Customer Service Chat
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..
Flow chart of volume of sphere, flow chart of volume of sphere
flow chart of volume of sphere
Miss, Depreciation to a salvage value of 0. For tax purposes an item m...
Depreciation to a salvage value of 0. For tax purposes an item may be depreciated over a period of several years, n. With the straight line method of depreciati
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. The area under a curve between two points can b
A palindrome is a string that reads the same from both the e, submitting so...
submitting solutions in C language should not use functions from / as these files do not exist in gcc
Explain mixed mode expressions and implicit type conversions, Mixed Mode Ex...
Mixed Mode Expressions and Implicit type Conversions A mixed mode expression is one in which the operands are not of the similar type. In this case, the operands are converted
C#, 1. write a program named InputMethodDemo2 that eliminates the repetitiv...
1. write a program named InputMethodDemo2 that eliminates the repetitive code in the InputMethod() in the InputMethodDemo program. Rewrite the program so the InputMethod()contains
Write a c program to input a floating point number, Step 1 Define the start...
Step 1 Define the start of the program It should be noted that within C all commands should end in a semi-colon. For most of your programs the definition of a program header as
Implement binary heap in c++?, A:BinaryHeap.h ------------ #ifndef BI...
A:BinaryHeap.h ------------ #ifndef BINARY_HEAP_H_ #define BINARY_HEAP_H_ #include "dsexceptions.h" #include "vector.h" // BinaryHeap class // CONSTRUCTION: wi
How can I fix this to, Write a program consisting of two functions (plus ma...
Write a program consisting of two functions (plus main). The first function should read in a number and then pass this back to main. This value should then be passed into a secon
We want network-social app, We are seeking a talented developer/team with g...
We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional
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
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.