Assignment help, C/C++ Programming

Assignment Help:


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
(https://www.cdc.gov/phpr/zombies.htm). See also https://www.cdc.gov/phpr/_media/cymkPrint/11_225700_A_Zombie_Final.pdf
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’
(https://en.wikipedia.org/wiki/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[42]) 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[42] and char[8]) 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
For example:
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.


Related Discussions:- Assignment help

Area under curve, a program to find the area under curve y=f(x) between x=a...

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.   #include float start_point, /* G

Explain member functions of a class, Member Functions of a Class A memb...

Member Functions of a Class A member function of the class is similar as an ordinary function. Its declaration in a class template must explain its return value as well as the

Illustrate bit fields with structures, C language lets us do this in a stru...

C language lets us do this in a structure definition by putting: bit length after the variable that is. struct packed_struct { unsigned int f1:1; unsigned int f2:1; unsigned

Advantages to the use of functions, Question: (a) What is a function? A...

Question: (a) What is a function? Are functions needed when writing a C program? (b) State one of the advantages to the use of functions. (c) What do you meant by underst

Program of conversion between objects of different classes, Conversion betw...

Conversion between Objects of Different Classes As the compiler does not know anything about the user-defined type, the conversion instructions are to be specified in a functio

Program Assignment #3, Programming Assignment #3: Vehicle Track Performance...

Programming Assignment #3: Vehicle Track Performance Tests Purpose: The purpose of this programming assignment is to give the student experience in using functions, arrays, and str

How many non-boundary pits and peaks are on the map, Armed with your functi...

Armed with your function from above, we can do some interesting things. For instance, any pixel where the offsets are both zero is a pit (lower than all surrounding points) .

Binary options ea for directfx and signalpush, Binary Options EA for Direct...

Binary Options EA for DirectFX and SignalPush Project Description: I want a programmer who will build an EA based on my three types of Binary strategy's using two Indicators.

Friend function, Ask question #Minimum 100 what is friend function is used ...

Ask question #Minimum 100 what is friend function is used in c++

Explain polymorphism, Polymorphism C++ supports this idea - that differ...

Polymorphism C++ supports this idea - that different objects do "the right thing "- by function polymorphism and class polymorphism. Poly means many, while morph means form.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd