SlideShare a Scribd company logo
[Pick the date] | Class | Instructor’s Name
What Is Autism?
[Your Name]What Is Autism?
Insert text here
Second Story Headline
3
What is the history of autism?
Insert text here
Insert text here
How has autism changed over the years?
Insert text here
How is Autism diagnosed?
How is autism diagnosed?
Insert text here
Family Supports and Resources
Insert text here
Second Story Headline
�
1
A brief overview of Autism Spectrum Disorders (ASD)
Contents
What is autism? 1
What is the history of autism? 2
How has autism changed over the years? 3
How is autism diagnosed? 4
References 6
2
�
Replace this text with a quote from the document or a summary
of an interesting point. You can position the text box anywhere
in the document.
� PAGE * MERGEFORMAT �3�
Inside Story Headline
Add a highlight here.
�
�
4
�
5
6
References
PA301 – Simple Translation Dictionary
We want to implement a program which will help students learn
the vocabulary of
foreign languages. The first step, which has been assigned to
you, is to build a data
structure representing a list of English words and their
translation in a foreign language.
We’ll also need to provide functions allowing us to lookup
translations from English-to-
Foreign and Foreign-to-English. The main data structure of this
program encapsulates
some variables specifying the maximal and current number of
words in the dictionary
along with a pointer to a dynamically allocated array of pointers
on another data structure
representing a pair of words.
A skeleton for this project is provided to you along with the
struct definitions.
Files you will be working with
You will be provided with several files to get you started
working on this assignment.
- You must not alter the file names, remove or add files to the
project
- You must only modify the ones marked below with a yes in
“Modify it?”
- You must not insert any comments or code in the tests.c file
which, when read by
another student, would give them any insights about the
solutions you
implemented in tools.c.
Important Academic Honesty Note;
The role of tests.c is to allow you to test your program to verify
it adheres to
requirements. Your instructor might allow you to exchange this
file, and this file
only, with other students. Therefore, you must uphold academic
honesty standards
by not inserting any information, besides the tests, which would
divulge your
design or implementation of the solutions to another student.
Failure to do so will
earn you a FF for the offering.
Here are the files;
File name Modify it? Role
tools.c Yes Implementation of your solution to the assignment
tests.c Yes Implementation of your test functions
tools.h No Header file for tools.c
main.c No Implementation of the main function starting your
tests
testlib.h No Definition of the TEST function you must use in
your tests
testlib.c No Implementation of the above
Task #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.
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 de-
allocating 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.
Task #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.
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.
PA301/main.c
// TODO - Nothing! Do not modify this file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern void runAllTests();
int main()
{
printf("Welcome to the Simple Translation
Dictionary!!!nnn");
runAllTests();
return EXIT_SUCCESS;
}
PA301/PA301.cbp
PA301/PA301.depend# depslib dependency file v1.01301965052
source:c:usersalessiodesktopworkbench___pa301main.c<st
dio.h><stdlib.h><string.h>1404255894
source:c:usersalessiodesktopworkbench___pa301tools.c<st
dlib.h><stdio.h><string.h>tools.h1404256047
c:usersalessiodesktopworkbench___pa301tools.h14083930
15
source:c:usersalessiolptdesktopworkbench301templatemain
.c<stdio.h><stdlib.h><string.h>1408393835
source:c:usersalessiolptdesktopworkbench301templatetests
.c<stdio.h><stdlib.h>testlib.htools.h1408418401
c:usersalessiolptdesktopworkbench301templatetestlib.h140
4259647
c:usersalessiolptdesktopworkbench301templatetools.h1408
393385
source:c:usersalessiolptdesktopworkbench301templatetools
.c<stdlib.h><stdio.h><string.h>tools.h1408418377
source:c:usersalessiolptdesktopworkbench301templatetestl
ib.c<stdlib.h><stdio.h>testlib.h1408418655
source:c:usersalessiolptdesktopworkbenchongoing
stuff301pa301tests.c<stdio.h><stdlib.h>testlib.htools.h14085
14693 c:usersalessiolptdesktopworkbenchongoing
stuff301pa301testlib.h1404259647
c:usersalessiolptdesktopworkbenchongoing
stuff301pa301tools.h1408393385
source:c:usersalessiolptdesktopworkbenchongoing
stuff301pa301tools.c<stdlib.h><stdio.h><string.h>tools.h
PA301/PA301.layout
PA301/testlib.c
// TODO - nothing, do not modify this file
#include <stdlib.h>
#include <stdio.h>
#include "testlib.h"
void TEST(const char * const shortDescription, int boolexp){
// keep track of tests numbers
static int testNumber = 0;
testNumber++;
// string representing the outcome of the test
char* testResult = NULL;
// determining the outcome
if(boolexp){
testResult = "OK";
}else{
testResult = "FAILS";
}
printf("[Test] #%3d --> %-5.5st%-50.50sn", testNumber,
testResult, shortDescription);
fflush(stdout);
}
PA301/testlib.h
// TODO - nothing, do not modify this file
#ifndef TESTLIB_H_INCLUDED
#define TESTLIB_H_INCLUDED
void TEST(const char * const shortDescription, int boolexp);
/* ROLE This function display information about the test
being "OK" or "FAILED"
based on whether the condition used as parameter is
respectively true or false
PARAMETERS
shortDescription a string describing the test. 45
characters long maximum
boolexp the result of evaluating a boolean
expression representing
what we are testing. If it evaluates to true,
the function
will display that the test succeeded.
Otherwise, it will
display that the test failed.
*/
#endif // TESTLIB_H_INCLUDED
PA301/tests.c
// TODO - Implement your tests in this file using testlib
functions
#include <stdio.h>
#include <stdlib.h>
#include "testlib.h"
#include "tools.h"
void test_example(){
// Example test function for you to adapt
struct dictionary * d = NULL;
d = dictionary_build(-3);
TEST("Building with negative size should return NULL",
d==NULL);
}
void runAllTests(){
/* ROLE Runs all the tests specified and displays results
*/
// For instance, you would have the following line in our
example;
// test_example();
}
PA301/tools.c
// TODO - Implement the functions in this file
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "tools.h"
struct dictionary *dictionary_build(int size){
return NULL;
}
int dictionary_add(struct dictionary* d,
const char * const english,
const char * const foreign){
return -1;
}
int dictionary_free( struct dictionary ** p){
return -1;
}
char* dictionary_translate( struct dictionary* d,
const char* const english_word,
const char* const foreign_word){
return NULL;
}
PA301/tools.h
// TODO - nothing, do not modify this file
#ifndef _TOOLS_H_
#define _TOOLS_H_
/* Data Structures Definitions */
struct wordPair {
char* englishWord;
char* foreignWord;
};
struct dictionary {
struct wordPair ** data;
int nbwords;
int size;
};
/* Prototypes of functions */
struct dictionary* dictionary_build(int size);
/* ROLE Allocate and initialize a new dictionary
structure able to accommodate
a number of pairs of words specified by the size
parameter
RETURNS Address of new dictionary, if allocation was
successful.
NULL otherwise
PARAMETERS The size of the dictionary to make
*/
int dictionary_add(struct dictionary* d,
const char * const english,
const char * const foreign);
/* ROLE Adds a new wordPair made of strdup copies of
the parameter strings
to a dictionary d
RETURNS 0 if everything went fine
-1 if the dictionary or the field inside of it used to
store
word pairs are NULL
-2 if we are unable to allocate a new wordPair
-3 if the English word is missing, i.e. English
parameter is NULL
-4 if the foreign word is missing, i.e. foreign
parameter is NULL
-5 if the dictionary is already full
-6 for any other problem you are able to detect -
if any
PARAMETERS d the dictionary to work with
English string representing the English part of
the new wordPair
foreign string representing the foreign part of
the new wordPair
*/
char* dictionary_translate(struct dictionary* d,
const char* const english,
const char* const foreign);
/* ROLE Looks up the dictionary d for the translation
of a word depending on what
parameters are provided.
RETURNS If English is non NULL and foreign is
NULL, return a strdup of the
translation of English in d
if foreign is non NULL and English is NULL,
return a strdup of the
translation of foreign in d
If anything goes wrong, return NULL
PARAMETERS d Address of the dictionary to
work with
English string representing the English word to
translate, if any
foreign string representing the foreign work to
translate, if any
REMARKS words are not in any specific order, do not
assume an order when
searching in this "dictionary", you'll have to look
up every entry
against the words you are looking up
*/
int dictionary_free(struct dictionary** p);
/* ROLE Deallocate all memory which has been
dynamically allocated
in the dictionary structure pointed to by *p. Then
set the
pointer which address was passed as parameter to
NULL.
RETURNS 0 if everything went fine
-1 if we encountered some NULL pointers
where we should
have encountered non-NULL pointers
PARAMETERS Pointer on a pointer on our dictionary
REMARKS Please note that if a pointer has a wrong
address, we have no way to
detect this. We will just deallocate it and
potentially trigger a bug.
*/
#endif

More Related Content

Similar to [Pick the date] Class Instructor’s NameWhat Is Autism.docx

UNIT 3 python.pptx
UNIT 3 python.pptxUNIT 3 python.pptx
UNIT 3 python.pptx
TKSanthoshRao
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptx
NileshBorkar12
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
monicafrancis71118
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
cargillfilberto
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
drandy1
 
Testing
TestingTesting
Testing
Kiran Kumar
 
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docxSheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
lesleyryder69361
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQL
Steven Feuerstein
 
Automated Essay Grading using Features Selection
Automated Essay Grading using Features SelectionAutomated Essay Grading using Features Selection
Automated Essay Grading using Features Selection
IRJET Journal
 
Introduction to testing.
Introduction to testing.Introduction to testing.
Introduction to testing.
Jithinctzz
 
Programming style guideline very good
Programming style guideline very goodProgramming style guideline very good
Programming style guideline very good
Dang Hop
 
Dive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdfDive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdf
SudhanshiBakre1
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
mrsmackenzie
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
mrsmackenzie
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
Hamad Odhabi
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
shandicollingwood
 
This first assignment will focus on coding in Python, applying kno.docx
This first assignment will focus on coding in Python, applying kno.docxThis first assignment will focus on coding in Python, applying kno.docx
This first assignment will focus on coding in Python, applying kno.docx
abhi353063
 
Software Testing
Software TestingSoftware Testing
Software Testing
AdroitLogic
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
vishal choudhary
 
Test case writing
Test case writingTest case writing
Test case writing
Afsarah Jahin
 

Similar to [Pick the date] Class Instructor’s NameWhat Is Autism.docx (20)

UNIT 3 python.pptx
UNIT 3 python.pptxUNIT 3 python.pptx
UNIT 3 python.pptx
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptx
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxCOMM 166 Final Research Proposal GuidelinesThe proposal should.docx
COMM 166 Final Research Proposal GuidelinesThe proposal should.docx
 
Testing
TestingTesting
Testing
 
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docxSheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
 
utPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQLutPLSQL: Unit Testing for Oracle PL/SQL
utPLSQL: Unit Testing for Oracle PL/SQL
 
Automated Essay Grading using Features Selection
Automated Essay Grading using Features SelectionAutomated Essay Grading using Features Selection
Automated Essay Grading using Features Selection
 
Introduction to testing.
Introduction to testing.Introduction to testing.
Introduction to testing.
 
Programming style guideline very good
Programming style guideline very goodProgramming style guideline very good
Programming style guideline very good
 
Dive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdfDive into Python Functions Fundamental Concepts.pdf
Dive into Python Functions Fundamental Concepts.pdf
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
 
This first assignment will focus on coding in Python, applying kno.docx
This first assignment will focus on coding in Python, applying kno.docxThis first assignment will focus on coding in Python, applying kno.docx
This first assignment will focus on coding in Python, applying kno.docx
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
Test case writing
Test case writingTest case writing
Test case writing
 

More from danielfoster65629

ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docxASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
danielfoster65629
 
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docxAssignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
danielfoster65629
 
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docx
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docxAssignment 3 Neuroanatomy ProjectImagine that you are working in .docx
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docx
danielfoster65629
 
Assignment 3 Network Security Planning - SAFE· Securing a lar.docx
Assignment 3 Network Security Planning - SAFE· Securing a lar.docxAssignment 3 Network Security Planning - SAFE· Securing a lar.docx
Assignment 3 Network Security Planning - SAFE· Securing a lar.docx
danielfoster65629
 
Assignment 3 Mobile Computing and Social Networking Due Week 7 a.docx
Assignment 3 Mobile Computing and Social Networking  Due Week 7 a.docxAssignment 3 Mobile Computing and Social Networking  Due Week 7 a.docx
Assignment 3 Mobile Computing and Social Networking Due Week 7 a.docx
danielfoster65629
 
Assignment 3 Marketing PlanTali GoyaGroup.docx
Assignment 3 Marketing PlanTali GoyaGroup.docxAssignment 3 Marketing PlanTali GoyaGroup.docx
Assignment 3 Marketing PlanTali GoyaGroup.docx
danielfoster65629
 
Assignment 3 Management Accounting Case West Island Products.docx
Assignment 3 Management Accounting Case West Island Products.docxAssignment 3 Management Accounting Case West Island Products.docx
Assignment 3 Management Accounting Case West Island Products.docx
danielfoster65629
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSAs.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSAs.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSAs.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSAs.docx
danielfoster65629
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSDue We.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSDue We.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSDue We.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSDue We.docx
danielfoster65629
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDS Due W.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDS Due W.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDS Due W.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDS Due W.docx
danielfoster65629
 
Assignment 3 Knowledge Instrument – Summative Assessment .docx
Assignment 3 Knowledge Instrument – Summative Assessment .docxAssignment 3 Knowledge Instrument – Summative Assessment .docx
Assignment 3 Knowledge Instrument – Summative Assessment .docx
danielfoster65629
 
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docxAssignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
danielfoster65629
 
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docxAssignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
danielfoster65629
 
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docxAssignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
danielfoster65629
 
Assignment 3 Gender IdentityWe are socialized at every stage in l.docx
Assignment 3 Gender IdentityWe are socialized at every stage in l.docxAssignment 3 Gender IdentityWe are socialized at every stage in l.docx
Assignment 3 Gender IdentityWe are socialized at every stage in l.docx
danielfoster65629
 
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docxAssignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
danielfoster65629
 
Assignment 4 Informative Report – DraftChoose a familia.docx
Assignment 4 Informative Report – DraftChoose a familia.docxAssignment 4 Informative Report – DraftChoose a familia.docx
Assignment 4 Informative Report – DraftChoose a familia.docx
danielfoster65629
 
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docx
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docxAssignment 4 Excel ProblemsAt the end of each module, you will ap.docx
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docx
danielfoster65629
 
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docxAssignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
danielfoster65629
 
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docx
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docxAssignment 4 Cultural Information PaperDue in Week 10 and worth.docx
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docx
danielfoster65629
 

More from danielfoster65629 (20)

ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docxASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
ASSIGNMENT 3 POWER, POLITICS, AND CULTURE Due Week 9 and .docx
 
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docxAssignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
Assignment 3 Organization of a Health Care FacilityDue Week 6 and.docx
 
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docx
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docxAssignment 3 Neuroanatomy ProjectImagine that you are working in .docx
Assignment 3 Neuroanatomy ProjectImagine that you are working in .docx
 
Assignment 3 Network Security Planning - SAFE· Securing a lar.docx
Assignment 3 Network Security Planning - SAFE· Securing a lar.docxAssignment 3 Network Security Planning - SAFE· Securing a lar.docx
Assignment 3 Network Security Planning - SAFE· Securing a lar.docx
 
Assignment 3 Mobile Computing and Social Networking Due Week 7 a.docx
Assignment 3 Mobile Computing and Social Networking  Due Week 7 a.docxAssignment 3 Mobile Computing and Social Networking  Due Week 7 a.docx
Assignment 3 Mobile Computing and Social Networking Due Week 7 a.docx
 
Assignment 3 Marketing PlanTali GoyaGroup.docx
Assignment 3 Marketing PlanTali GoyaGroup.docxAssignment 3 Marketing PlanTali GoyaGroup.docx
Assignment 3 Marketing PlanTali GoyaGroup.docx
 
Assignment 3 Management Accounting Case West Island Products.docx
Assignment 3 Management Accounting Case West Island Products.docxAssignment 3 Management Accounting Case West Island Products.docx
Assignment 3 Management Accounting Case West Island Products.docx
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSAs.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSAs.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSAs.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSAs.docx
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSDue We.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSDue We.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDSDue We.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDSDue We.docx
 
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDS Due W.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDS Due W.docxAssignment 3 Legal Ethics, Patients’ Rights, and HIV  AIDS Due W.docx
Assignment 3 Legal Ethics, Patients’ Rights, and HIV AIDS Due W.docx
 
Assignment 3 Knowledge Instrument – Summative Assessment .docx
Assignment 3 Knowledge Instrument – Summative Assessment .docxAssignment 3 Knowledge Instrument – Summative Assessment .docx
Assignment 3 Knowledge Instrument – Summative Assessment .docx
 
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docxAssignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
Assignment 3 Juvenile ProbationIn many ways, juvenile probation i.docx
 
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docxAssignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
Assignment 3 Grading CriteriaMaximum PointsDescribe steps take.docx
 
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docxAssignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
 
Assignment 3 Gender IdentityWe are socialized at every stage in l.docx
Assignment 3 Gender IdentityWe are socialized at every stage in l.docxAssignment 3 Gender IdentityWe are socialized at every stage in l.docx
Assignment 3 Gender IdentityWe are socialized at every stage in l.docx
 
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docxAssignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
Assignment 4 Impressions of Museum or Gallery Exhibit$20The Bro.docx
 
Assignment 4 Informative Report – DraftChoose a familia.docx
Assignment 4 Informative Report – DraftChoose a familia.docxAssignment 4 Informative Report – DraftChoose a familia.docx
Assignment 4 Informative Report – DraftChoose a familia.docx
 
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docx
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docxAssignment 4 Excel ProblemsAt the end of each module, you will ap.docx
Assignment 4 Excel ProblemsAt the end of each module, you will ap.docx
 
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docxAssignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
Assignment 4 Designing Compliance Within the LAN-to-WAN DomainD.docx
 
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docx
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docxAssignment 4 Cultural Information PaperDue in Week 10 and worth.docx
Assignment 4 Cultural Information PaperDue in Week 10 and worth.docx
 

Recently uploaded

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 

Recently uploaded (20)

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 

[Pick the date] Class Instructor’s NameWhat Is Autism.docx

  • 1. [Pick the date] | Class | Instructor’s Name What Is Autism? [Your Name]What Is Autism? Insert text here Second Story Headline 3 What is the history of autism? Insert text here Insert text here How has autism changed over the years? Insert text here How is Autism diagnosed? How is autism diagnosed? Insert text here Family Supports and Resources Insert text here
  • 2. Second Story Headline � 1 A brief overview of Autism Spectrum Disorders (ASD) Contents What is autism? 1 What is the history of autism? 2 How has autism changed over the years? 3 How is autism diagnosed? 4 References 6
  • 3. 2 � Replace this text with a quote from the document or a summary of an interesting point. You can position the text box anywhere in the document. � PAGE * MERGEFORMAT �3� Inside Story Headline Add a highlight here. � �
  • 4. 4 � 5 6 References PA301 – Simple Translation Dictionary We want to implement a program which will help students learn the vocabulary of foreign languages. The first step, which has been assigned to you, is to build a data structure representing a list of English words and their
  • 5. translation in a foreign language. We’ll also need to provide functions allowing us to lookup translations from English-to- Foreign and Foreign-to-English. The main data structure of this program encapsulates some variables specifying the maximal and current number of words in the dictionary along with a pointer to a dynamically allocated array of pointers on another data structure representing a pair of words. A skeleton for this project is provided to you along with the struct definitions. Files you will be working with You will be provided with several files to get you started working on this assignment. - You must not alter the file names, remove or add files to the project - You must only modify the ones marked below with a yes in “Modify it?” - You must not insert any comments or code in the tests.c file which, when read by another student, would give them any insights about the solutions you
  • 6. implemented in tools.c. Important Academic Honesty Note; The role of tests.c is to allow you to test your program to verify it adheres to requirements. Your instructor might allow you to exchange this file, and this file only, with other students. Therefore, you must uphold academic honesty standards by not inserting any information, besides the tests, which would divulge your design or implementation of the solutions to another student. Failure to do so will earn you a FF for the offering. Here are the files; File name Modify it? Role tools.c Yes Implementation of your solution to the assignment tests.c Yes Implementation of your test functions tools.h No Header file for tools.c main.c No Implementation of the main function starting your tests testlib.h No Definition of the TEST function you must use in
  • 7. your tests testlib.c No Implementation of the above Task #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
  • 8. 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. 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 de- allocating 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
  • 9. 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. Task #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. Task #4 – Implement and test dictionary_translate
  • 10. 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. PA301/main.c // TODO - Nothing! Do not modify this file #include <stdio.h>
  • 11. #include <stdlib.h> #include <string.h> extern void runAllTests(); int main() { printf("Welcome to the Simple Translation Dictionary!!!nnn"); runAllTests(); return EXIT_SUCCESS; } PA301/PA301.cbp PA301/PA301.depend# depslib dependency file v1.01301965052 source:c:usersalessiodesktopworkbench___pa301main.c<st dio.h><stdlib.h><string.h>1404255894 source:c:usersalessiodesktopworkbench___pa301tools.c<st dlib.h><stdio.h><string.h>tools.h1404256047 c:usersalessiodesktopworkbench___pa301tools.h14083930 15
  • 12. source:c:usersalessiolptdesktopworkbench301templatemain .c<stdio.h><stdlib.h><string.h>1408393835 source:c:usersalessiolptdesktopworkbench301templatetests .c<stdio.h><stdlib.h>testlib.htools.h1408418401 c:usersalessiolptdesktopworkbench301templatetestlib.h140 4259647 c:usersalessiolptdesktopworkbench301templatetools.h1408 393385 source:c:usersalessiolptdesktopworkbench301templatetools .c<stdlib.h><stdio.h><string.h>tools.h1408418377 source:c:usersalessiolptdesktopworkbench301templatetestl ib.c<stdlib.h><stdio.h>testlib.h1408418655 source:c:usersalessiolptdesktopworkbenchongoing stuff301pa301tests.c<stdio.h><stdlib.h>testlib.htools.h14085 14693 c:usersalessiolptdesktopworkbenchongoing stuff301pa301testlib.h1404259647 c:usersalessiolptdesktopworkbenchongoing stuff301pa301tools.h1408393385 source:c:usersalessiolptdesktopworkbenchongoing stuff301pa301tools.c<stdlib.h><stdio.h><string.h>tools.h PA301/PA301.layout PA301/testlib.c // TODO - nothing, do not modify this file #include <stdlib.h> #include <stdio.h> #include "testlib.h"
  • 13. void TEST(const char * const shortDescription, int boolexp){ // keep track of tests numbers static int testNumber = 0; testNumber++; // string representing the outcome of the test char* testResult = NULL; // determining the outcome if(boolexp){ testResult = "OK"; }else{ testResult = "FAILS"; } printf("[Test] #%3d --> %-5.5st%-50.50sn", testNumber, testResult, shortDescription); fflush(stdout);
  • 14. } PA301/testlib.h // TODO - nothing, do not modify this file #ifndef TESTLIB_H_INCLUDED #define TESTLIB_H_INCLUDED void TEST(const char * const shortDescription, int boolexp); /* ROLE This function display information about the test being "OK" or "FAILED" based on whether the condition used as parameter is respectively true or false PARAMETERS shortDescription a string describing the test. 45 characters long maximum boolexp the result of evaluating a boolean expression representing what we are testing. If it evaluates to true, the function will display that the test succeeded. Otherwise, it will
  • 15. display that the test failed. */ #endif // TESTLIB_H_INCLUDED PA301/tests.c // TODO - Implement your tests in this file using testlib functions #include <stdio.h> #include <stdlib.h> #include "testlib.h" #include "tools.h" void test_example(){ // Example test function for you to adapt struct dictionary * d = NULL; d = dictionary_build(-3);
  • 16. TEST("Building with negative size should return NULL", d==NULL); } void runAllTests(){ /* ROLE Runs all the tests specified and displays results */ // For instance, you would have the following line in our example; // test_example(); } PA301/tools.c // TODO - Implement the functions in this file #include <stdlib.h> #include <stdio.h> #include <string.h>
  • 17. #include "tools.h" struct dictionary *dictionary_build(int size){ return NULL; } int dictionary_add(struct dictionary* d, const char * const english, const char * const foreign){ return -1; } int dictionary_free( struct dictionary ** p){ return -1; } char* dictionary_translate( struct dictionary* d, const char* const english_word,
  • 18. const char* const foreign_word){ return NULL; } PA301/tools.h // TODO - nothing, do not modify this file #ifndef _TOOLS_H_ #define _TOOLS_H_ /* Data Structures Definitions */ struct wordPair { char* englishWord; char* foreignWord; }; struct dictionary { struct wordPair ** data;
  • 19. int nbwords; int size; }; /* Prototypes of functions */ struct dictionary* dictionary_build(int size); /* ROLE Allocate and initialize a new dictionary structure able to accommodate a number of pairs of words specified by the size parameter RETURNS Address of new dictionary, if allocation was successful. NULL otherwise PARAMETERS The size of the dictionary to make */ int dictionary_add(struct dictionary* d,
  • 20. const char * const english, const char * const foreign); /* ROLE Adds a new wordPair made of strdup copies of the parameter strings to a dictionary d RETURNS 0 if everything went fine -1 if the dictionary or the field inside of it used to store word pairs are NULL -2 if we are unable to allocate a new wordPair -3 if the English word is missing, i.e. English parameter is NULL -4 if the foreign word is missing, i.e. foreign parameter is NULL -5 if the dictionary is already full -6 for any other problem you are able to detect - if any PARAMETERS d the dictionary to work with English string representing the English part of
  • 21. the new wordPair foreign string representing the foreign part of the new wordPair */ char* dictionary_translate(struct dictionary* d, const char* const english, const char* const foreign); /* ROLE Looks up the dictionary d for the translation of a word depending on what parameters are provided. RETURNS If English is non NULL and foreign is NULL, return a strdup of the translation of English in d if foreign is non NULL and English is NULL, return a strdup of the translation of foreign in d If anything goes wrong, return NULL
  • 22. PARAMETERS d Address of the dictionary to work with English string representing the English word to translate, if any foreign string representing the foreign work to translate, if any REMARKS words are not in any specific order, do not assume an order when searching in this "dictionary", you'll have to look up every entry against the words you are looking up */ int dictionary_free(struct dictionary** p); /* ROLE Deallocate all memory which has been dynamically allocated in the dictionary structure pointed to by *p. Then set the
  • 23. pointer which address was passed as parameter to NULL. RETURNS 0 if everything went fine -1 if we encountered some NULL pointers where we should have encountered non-NULL pointers PARAMETERS Pointer on a pointer on our dictionary REMARKS Please note that if a pointer has a wrong address, we have no way to detect this. We will just deallocate it and potentially trigger a bug. */ #endif