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

Develop a telephone billing system, Project Description: My project is a...

Project Description: My project is about telephone billing system. This project was my project in my college life. The project is quite easy, i needed C++ programming language..

Area, Write a program to find the area under the curve y = f(x) between 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

code, direction[] = {L,R,R,L,L,R,R,R,R,L,Z} length[]= {2,2,1,1,1,2,5,2,2,3...

direction[] = {L,R,R,L,L,R,R,R,R,L,Z} length[]= {2,2,1,1,1,2,5,2,2,3,1}

Define procedure to input integers and returns the average, The procedure +...

The procedure +, * and list take arbitrary numbers of arguments. One way to define such a procedure is to use define with dotted-tail notation. In a procedure definition, a paramet

How does c++ help with the tradeoff of security vs.usability, A: In C, enca...

A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static

How to write Bernoulli''s principle, compose a C program to solve the equat...

compose a C program to solve the equation z2=(p1/Pg)+(v1^2/2g)+z1 p1=100kpa,v1=2m/s z1=3m P=1000kg/m^3 define g=9.81

Luminous Jewels, Jewels can only be removed for polishing from either end o...

Jewels can only be removed for polishing from either end of the necklace

Assignment, Ask question #MA company is rewriting its payroll system to mov...

Ask question #MA company is rewriting its payroll system to move it from an old mainframe to a distributed mini-computer/PC-based networked setup. No new functionality will be adde

Solve system of linear equations-gaussian elimination , Write a C function ...

Write a C function to solve the system of linear equations A x = y where A is an N by N matrix in the format of pointer-to-pointers and y is a vector in the format of a pointer. Th

Prepare aime crossover alert expert adviso, Prepare aime crossover alert ex...

Prepare aime crossover alert expert adviso Project Description: Need to develop an expert advisor base on aime crossover alert indicator. Skills required is C Programming

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