Drawing a diagram of the data structures

Assignment Help Database Management System
Reference no: EM13785629

1 - Implement and test dictionary_build

This first function, which you will implement in tools.c, will be used every time you need to start working on a new dictionary. Part of your grade on this implementation will be on how well your function handles error situations; e.g. we ask for a dictionary of negative size, there is no memory available for your malloc...

Any time you encounter one of these, or similar, errors, you should return a specific value from your function which is described in the program's source itself. When you test your function with such parameters, you should verify its return value is appropriate.

Make sure you follow our usual process when working on this function;

- Read the requirements & existing source thoroughly

- Implement your tests based on how you understand the requirements. This time you will note that we are not providing tests at all. Part of your work is to leverage what you learned in the previous PAs to design & implement your own tests

- Implement the function dictionary_build

- Update your tests based on what you learned

- Refactor your solution before to go to the next task.

2 - Implement and test dictionary_free

This 2nd function will be used to de-allocate a dictionary. Here are some things to keep in mind;

- Make sure you dispose of all the memory you allocated in a struct dictionary.

Drawing a diagram of the data structures will help you figure out what you are deallocating as you write your dictionary_free function. This should help you avoid memory leaks.

- If the dictionary passed to your function is only partially allocated - e.g. due to a bug elsewhere - you should handle it gracefully; i.e. before to free a pointer, make sure it is not NULL.

Follow the steps outlined in task#1 as you work on implementing this task. Again, the source code provides you with most of the information you need in the form of comments and the code itself.

3 - Implement and test dictionary_add

The 3rd function will take a dictionary and two strings as parameters. It will use strdup to make a copy of the words provided as parameters and insert them as a new element in the dictionary.

Again, detect possible bad parameters; e.g. no words provided; 1 word instead of 2... and verify the return value is appropriate based on the documentation in the program itself.

Follow the steps outlined in task#1 as you work on implementing this task.

4 - Implement and test dictionary_translate

This function, as indicated in its comments, will return a strdup copy of the translation of one of the two strings passed as parameter. It is expected that one will use this function with a valid dictionary, and specify one of the two strings to be NULL.

- If the English word parameter is NULL, we are providing a string in the foreign language to be translated into English.
- If the foreign word is NULL, we do the opposite.

Passing two non-NULL strings or a NULL dictionary are errors which should be handled by your function returning the value described in the documentation in the program itself.

Follow the steps outlined in task#1 as you work on implementing this task.

Reference no: EM13785629

Questions Cloud

Net present value of investment : What is the net present value of each investment? What is the internal rate of return for each investment?
Key aspect of the case and examine its : Discuss the real-life case that you selected, in which, like Roland Gary, the defendant was wrongly accused and later vindicated. Explore one (1) key aspect of the case and examine its relation to the case at large. Describe the resolution to the sel..
Discuss appointment scheduling highlights : Discuss appointment scheduling highlights.
Any sports-related article : Choose any sports-related article for this assignment, provided that: (1) it comes from a printed magazine, newspaper, or scholarly journal (examples include but are not limited to: Newsweek, New York Times, Chicago Tribune, Sports Illustrated, Jo..
Drawing a diagram of the data structures : Drawing a diagram of the data structures will help you figure out what you are deallocating as you write your dictionary_free function. This should help you avoid memory leaks.
Revenue expenditures and capital expenditures : Write a 350- to 700-word summary explaining the differences between revenue expenditures and capital expenditures during a useful life and identifying any similarities. Briefly explain the entries of revenue expenditures and capital expenditures.
Panera bread''s strategy issues : What does a SWOT analysis of Panera Bread reveal about the overall attractiveness of its situation?
Why you want to join the nypd auxiliary program : Breif paragraph on why you want to join the nypd auxiliary program and what you have to offer the program
What is the dividing line between murder and manslaughter : How do abuse crimes differ from other assault crimes? what crimes are covered by the Violence Against Women Act? What landmark case changed kidnapping laws in the 1930's? What currnt phenomenon keeps the penalties stringent

Reviews

Write a Review

 

Database Management System Questions & Answers

  Use case diagram for the functional requirements

Analyse the Case Study documents and produce an initial high level functional requirements specification. Document these requirements with.

  Programming with sql using number and date fun

Programming with SQL Objectives: Using Character, Number and Date Functions. • Create and execute single-row functions that perform case conversion and/or character manipulation. • Create and execute single-row number functions ROUND and TRUNC. •..

  Database server management

Design an Entity model and construct a set of tables with suitably defined columns to support this scenario and find details of all books stocked in London

  Brief summary of the data architecture of the company

Understand the challenges and evaluate the risks in managing the security of an information system  Critically analyse using a threat and risk assessment.

  Develop view for sum of number ordered multiplied by price

Develop a view named OrdTot. It comprises the order number and order total for each order presently on file. (Order total is sum of the number ordered multiplied by quoted price.

  Write a paper describing project management lifecycle

Write a paper describing Project management lifecycle and Systems Delivery lifecycle.Your paper must contain two well-formed paragraphs (a topic sentence supported by three to four additional sentences).

  Is there a polynomial algorithm for testing whether a

Prove that, if R is in 3NF and every key is simple, then R is in BCNF.

  Explain what do business rules require to be effective

What are the advantages of having the DBMS between the end user's applications and the database. What are some reasons for studying file systems. IT 645 - Database Management Systems

  Draw the cash-flow diagram for this situation

Construct a loan amortization table, similar to the one shown in table 6-2, showing the principal and interest seperated for the first 6 months of FunSoft's loan.

  1 start with checksalary trigger explain below on triggers

1 start with checksalary trigger explain below on triggers. show that that trigger creates muttating table error. in

  Difference between navigation mode and editing mode

In Datasheet view, what is the difference between navigation mode and editing mode? What command can you use in Datasheet view to remove the display of one or more fields from the datasheet

  Why data-warehousing greatest threat to individual privacy

Consider following opinion shared by some people: database management systems and data-warehousing techniques are the greatest threat to individual privacy in modern times. What is your opinion?

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