Introduction此课程是用c语言实现链表,包括链表的增删改查,搜索功能,在linux平台下编码,另外练习如何使用makefile。RequirementCOMP 2160 Programming PracticesAssignment 3Page 1 of 2Due Date: March 14 th at 11:59pmN OTES Please read and follow instructions carefully; not doing so will result in a loss of marks. Your code must follow the programming standards (available in UMLearn). You can write your code on any machines; remember to verify your code on one of the lab machines. You must include a README file which describes how to compile and run your solution. You canalso explain your concerns or personal opinions regarding this assignment. Use submission tool (handin) in CS Unix system as described in Assignment SubmissionGuidelines (available in UMLearn).Q1: D ESIGN BY C ONTRACT [10]In this problem, you will create an implementation of the Table abstract data type (ADT). A Table is a datatype that allows for a few simple operations on a collection of data: Insertion Removal Searching for presence IterationUsing the provided interface table.h and the sample linked list code linkedlist_int.c, completean implementation of the Table ADT. Make sure that you apply the concepts of design by contract (DbC) toyour implementation.Once you have fully implemented the table, create a main.c file that implements a testing framework foryour table.Your table implementation must ensure that values inserted are unique, and internally sorted in ascendingorder (i.e., head points the lowest value) within a linked list. This is an implementation detC代写c语言实现链表Programming Practices调试C作业、C编程作业帮做ail of your table,and not part of the public interface. Be sure to only test what is known from the public interface (i.e., blackbox testing).Make sure you test with assertions turned off. Boundary conditions should not cause the program to crash.Remember that to turn off assertions you can compile with -DNDEBUG.Include a Makefile (along with all your source files) for your implementation.COMP 2160 Programming PracticesAssignment 3Page 2 of 2Q2: S ET (T ESTING ) [10]You have been provided with a Set ADT developed by a third party. This consists of a header file, set.h,defining the interface and the object file, coming soon (as a zip file), compiled for use in our Mac lab. Youmust implement a complete unit test suite to validate all functionality defined in the header file.Requirements and NotesHand in your main.c file (containing your test suite implementation) and a Makefile to compile yourcode and link it with set.o.You will be provided with, at least, two different object file implementations of Set. Include a report (in yourREADME file) for each object file, indicating whether they passed your tests or not. If an object file didn’tpass your tests include all failure conditions that must be addressed in the README.If, at any time, the code crashes then the problem is with your code. An object file may provide you witherroneous results but will never cause your program to fail outright.The test framework from question 1 should serve as a good foundation upon which to build the testframework for this question.& 转自:http://ass.3daixie.com/2018052610005591.html
讲解:CcProgramming PracticesC、C
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- “我觉得再也遇不到像他一样的少年了,喜欢整整五年,现在他去了一个很遥远的城市。我想过告诉他,可害怕拒绝,还不如怀一...