CECS 130 Mid-term Test Review Provided by REACH – Resources for Academic Achievement Presenter: [REACH Tutor]

Slides:



Advertisements
Similar presentations
Character Arrays (Single-Dimensional Arrays) A char data type is needed to hold a single character. To store a string we have to use a single-dimensional.
Advertisements

Introduction to C Programming
Programming Languages and Paradigms The C Programming Language.
Single Variable and a Lot of Variables The declaration int k; float f; reserve one single integer variable called k and one single floating point variable.
What is a pointer? First of all, it is a variable, just like other variables you studied So it has type, storage etc. Difference: it can only store the.
CSCI 171 Presentation 11 Pointers. Pointer Basics.
 #include  Using a directive to include a header file  Stdio.h = standard input output header file.
Kernighan/Ritchie: Kelley/Pohl:
Arrays. INTRODUCTION TO ARRAYS Just as with loops and conditions, arrays are a common programming construct and an important concept Arrays can be found.
Chapter 6 C Arrays Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc. Arrays are data structures.
Data types and variables
1 Pointers, Dynamic Data, and Reference Types Review on Pointers Reference Variables Dynamic Memory Allocation –The new operator –The delete operator –Dynamic.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Introduction To C++ Programming 1.0 Basic C++ Program Structure 2.0 Program Control 3.0 Array And Structures 4.0 Function 5.0 Pointer 6.0 Secure Programming.
CECS 121 EXAM 1. /* C Programming for the Absolute Beginner */ // by Michael Vine #include main() { printf(“\nC you later\n”); system(“pause”); }
CECS 121 EXAM 2.  Function Prototype Syntax return-type function_name ( arg_type arg1,..., arg_type argN);  Function Prototypes tell you the data type.
Chapter 17 Pointers and Arrays. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Pointers and Arrays.
/* C Programming for the Absolute Beginner */ // by Michael Vine #include main() { printf(“\nC you later\n”); system(“pause”); }
C STRUCTURES. A FIRST C PROGRAM  #include  void main ( void )  { float height, width, area, wood_length ;  scanf ( "%f", &height ) ;  scanf ( "%f",
Introduction to C Programming Chapter 2 : Data Input, Processing and Output.
CECS 121 Test 1. Functions allow you to group program statements under one name C and C++ are case-sensitive so main(), MAIN(), and Main() are all different.
CECS 130 EXAM 2.  Function Prototype Syntax return-type function_name ( arg_type arg1,..., arg_type argN);  Function Prototypes tell you the data type.
Pointers: Basics. 2 What is a pointer? First of all, it is a variable, just like other variables you studied  So it has type, storage etc. Difference:
CECS 130 EXAM 1. To declare a constant (read only) value: const int x = 20; const float PI = 3.14; Can we do this? const int x;
/* C Programming for the Absolute Beginner */ // by Michael Vine #include main() { printf(“\nC you later\n”); system(“pause”); }
Review 1 List Data Structure List operations List Implementation Array Linked List.
Old Material escape sequences operator precedence printf() scanf() if() switch case &&,|| while, do-while, ++, -- functions New Material 1-D arrays string.
CECS 130 EXAM 1.  int main() { printf (“%c %c \n", 'a', 65); printf ("%d %ld\n", 1977, L); printf (" %10d \n", 1977); printf ("%010d \n", 1977);
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Pointers *, &, array similarities, functions, sizeof.
1. 1. Introduction to Array 2. Arrays of Data 3. Array Declaration 4. Array Initialization 5. Operations on Array 6. Multidimensional Arrays 7. Index.
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Arrays.
CECS 121 Final Test.  Function Prototype Syntax return-type function_name ( arg_type arg1,..., arg_type argN);  Function Prototypes tell you the data.
Chapter 8 Arrays. A First Book of ANSI C, Fourth Edition2 Introduction Atomic variable: variable whose value cannot be further subdivided into a built-in.
Gator Engineering Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 3 Formatted Input/Output.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
1 Recall that... char str [ 8 ]; str is the base address of the array. We say str is a pointer because its value is an address. It is a pointer constant.
1 Chapter 15-1 Pointers, Dynamic Data, and Reference Types Dale/Weems.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 11: Pointers.
Chapter 16 Pointers and Arrays Pointers and Arrays We've seen examples of both of these in our LC-3 programs; now we'll see them in C. Pointer Address.
SEQUENTIAL AND OBJECT ORIENTED PROGRAMMING Arrays.
CECS 121 Midterm Review Presented by REACH (If you have not signed the attendance sheet, please do so now!)
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X 1 Chapter 7 Pointers and C-Strings.
1 Chapter 7 Pointers and C-Strings. 2 Objectives  To describe what a pointer is (§7.1).  To learn how to declare a pointer and assign a value to it.
Beginning C for Engineers Fall 2005 Arrays, 2-D arrays, character strings Bettina Schimanski Lecture 5: Section 2 (9/28/05) Section 4 (9/29/05)
KUKUM-06/07 EKT120: Computer Programming 1 Week 6 Arrays-Part 1.
Pointers: Basics. 2 Address vs. Value Each memory cell has an address associated with it
DYNAMIC MEMORY ALLOCATION. Disadvantages of ARRAYS MEMORY ALLOCATION OF ARRAY IS STATIC: Less resource utilization. For example: If the maximum elements.
Chapter 8 Arrays, Strings and Pointers
Chapter 7 Pointers and C-Strings
Computer Science 210 Computer Organization
EKT120 COMPUTER PROGRAMMING
ECE Application Programming
BASIC ELEMENTS OF A COMPUTER PROGRAM
CECS 130 Mid-term Test Review
© 2016 Pearson Education, Ltd. All rights reserved.
Quiz 11/15/16 – C functions, arrays and strings
The Selection Structure
CECS 130 Mid-term Test Review
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Input/Output Input/Output operations are performed using input/output functions Common input/output functions are provided as part of C’s standard input/output.
Computer Science 210 Computer Organization
7 Arrays.
CECS 130 Mid-term Test Review
Chapter 16 Pointers and Arrays
7 Arrays.
CECS 130 Midterm Exam Review Spring 2019
Programming Languages and Paradigms
CECS 130 Mid-term Test Review
Files Chapter 8.
Presentation transcript:

CECS 130 Mid-term Test Review Provided by REACH – Resources for Academic Achievement Presenter: [REACH Tutor]

To download this presentation… Go to reach.louisville.edureach.louisville.edu Click “Tutoring” at the top left of the page. Click “Computer Tutoring” under the heading “TUTORING SERVICES FOR ALL STUDENTS.” Click “CECS Test Reviews” on the right-hand column. Scroll down to find your class. Or, just go to tiny.cc/REACH4CECStiny.cc/REACH4CECS

Content on the Mid-term Exam o Chapters 1-10 from C Programming for the Absolute Beginner, Second Edition by Michael Vine

So, we will be covering:  Data types  Conditions  Loops  Functions  Arrays  Pointers  Strings  Data Structures  Dynamic Memory

Data TypeDescriptionDeclarationExample IntegerWhole numbers, positive or negative int x = ;-3, 0, 3, 29 Floating- point number All numbers, positive or negative, decimals and fractions float x = ; , 0.00, CharacterRepresentations of integer values known as character codes char x = ‘ ’;m, M, * To declare a constant (read only) value: const int x = 20; const float PI = 3.14; Variable Types

scanf( ) ; printf( ) int x = 0; printf(“ What number should I print out? \n ”); scanf(“%d”, &x); //variables require an “&” sign before them for scanf() printf(“\n You chose: %d \n”, x); //but not for printf()

Conversion Specifiers  Character - %c  Integer - %d  Float (decimal)- %f  String - %s  Printf Format Tags: Format: %[flags][width][.precision][length]specifier Example: %[.precision]specifier Output: 12.12, ,

Scanf( );

Arithmetic and Order of Precedence

Output: Please enter first number: 2 Enter second number: 4 The result is 5. Predict the printout: User enters ‘2’ and ‘4’:

Output: Please enter first number: 2 Enter second number: 4 The result is 5. Predict the printout: User enters ‘2’ and ‘4’:

Can you predict the printout? Output: The result is 2.25

Can you predict the printout? Output: The result is 2.25

Conditions and Operators

Comparisons > greater than5 > 4 is TRUE <less than4 < 5 is TRUE >=greater than or equal 4 >= 4 is TRUE <=less than or equal3 <= 4 is TRUE ==equal to5 == 5 is TRUE !=not equal to5 != 4 is TRUE

Boolean Operators Do you know the answer to these?  A. !( 1 | | 0 )  B. !( 1 | |1&& 0 )  C. !(( 1 | | 0 ) && 0) = !( 1 ) = 0 = !( 1 | |0 ) = 0 = !(1 && 0) = !0 = 1

Boolean Operators Do you know the answer to these?  A. !( 1 | | 0 )  B. !( 1 | | 1 && 0 )  C. !(( 1 | | 0 ) && 0) = !1 = 0 = !( 1 | |0 ) = !1 = 0 = !(1 && 0) = !0 = 1

Example Using if-statements, write a program that will ask a user to enter a number 1, 2, or 3, and print out the following:

Example:

Switch-Case Statement

The while( ) loop while ( condition ) { Code to execute while the condition is true }

For Loop Often used when the # of iterations is already known. Contains 3 separate expressions: 1.Variable initialization 2.Conditional expression 3.Increment/Decrement

Break/Continue Statements break; Used to exit a loop. Once this statement is executed the program will execute the statement immediately following the end of the loop. continue; Used to manipulate program flow in a loop. When executed, any remaining statements in the loop will be skipped and the next iteration of the loop will begin.

Function Prototypes & Definitions Function Prototype Syntax return-type function_name ( arg_type arg1,..., arg_type argN ) Function Prototypes tell you the data type returned by the function, the data type of parameters, how many parameters, and the order of parameters. Function definitions implement the function prototype Where are function prototypes located in the program? Where do you find function definitions?

Function Prototypes & Definitions Where are function prototypes located in the program? Answer: before the main( ) { } function. Where do you find function definitions? Answer: function definitions are self-contained outside of the main( ) { } function, usually written below it.

Function Example #include int mult (int,int); // function prototype int main() { int x; int y; int z; printf( “ x = " );scanf( "%d", &x ); printf( “\n y = ”);scanf( "%d", &y ); printf( “\n z = ”);scanf( "%d", &z ); printf( “\n x*y = %d\n", mult( x, y ) ); printf( “\n z^2 = %d\n", mult( z, z ) ); } int mult (int a, int b) //function definition { return a * b; } #include int mult (int,int); // function prototype int main() { int x; int y; int z; printf( “ x = " );scanf( "%d", &x ); printf( “\n y = ”);scanf( "%d", &y ); printf( “\n z = ”);scanf( "%d", &z ); printf( “\n x*y = %d\n", mult( x, y ) ); printf( “\n z^2 = %d\n", mult( z, z ) ); } int mult (int a, int b) //function definition { return a * b; }

Function Example #include int mult (int,int); // function prototype int main() { int x; int y; int z; printf( “ x = " );scanf( "%d", &x ); printf( “\n y = ”);scanf( "%d", &y ); printf( “\n z = ”);scanf( "%d", &z ); printf( “\n\n x*y = %d\n", mult( x, y ) ); printf( “\n z^2 = %d\n", mult( z, z ) ); } int mult (int a, int b) //function definition { return a * b; } #include int mult (int,int); // function prototype int main() { int x; int y; int z; printf( “ x = " );scanf( "%d", &x ); printf( “\n y = ”);scanf( "%d", &y ); printf( “\n z = ”);scanf( "%d", &z ); printf( “\n\n x*y = %d\n", mult( x, y ) ); printf( “\n z^2 = %d\n", mult( z, z ) ); } int mult (int a, int b) //function definition { return a * b; } Output: x = 2 y = 3 z = 4 x*y = 6 z^2 = 16

Declaring a 1-D Array How do you declare a one-dimensional array made up of 10 integers? Answer: int iArray[10] Other array declarations: int iArray[10]; float fAverages[30]; double dResults[3]; short sSalaries [9]; char cName[19]; // 18 characters and 1 null character

Declaring a 1-D Array Why do we initialize? Because memory spaces may not be cleared from previous values when arrays are created. Can initialize an array directly. Example: int iArray[5]={0,1,2,3,4}; Can also initialize an array with a loop such as FOR( ) #include main() { int x; int iArray[5]; for( x=0; x < 5 ; x++) { iArray[x] = 0; } #include main() { int x; int iArray[5]; for( x=0; x < 5 ; x++) { iArray[x] = 0; }

Example: searching an array #include main() { int x; int iValue; int iFound = -1; int iArray[5]; // initialize the array for( x=0; x < 5 ; x++) { iArray[x] = ( x + x ); } printf(“\n Enter value to search for:”); scanf(“%d”, &iValue); // search for number for(x=0 ; x<5; x++) { if( iArray[x] ==iValue) { iFound = x; break; } if(iFound >-1) printf(“\n I found your search value in element %d \n”, iFound); else printf(“\n Sorry, your search value was not found \n”); } #include main() { int x; int iValue; int iFound = -1; int iArray[5]; // initialize the array for( x=0; x < 5 ; x++) { iArray[x] = ( x + x ); } printf(“\n Enter value to search for:”); scanf(“%d”, &iValue); // search for number for(x=0 ; x<5; x++) { if( iArray[x] ==iValue) { iFound = x; break; } if(iFound >-1) printf(“\n I found your search value in element %d \n”, iFound); else printf(“\n Sorry, your search value was not found \n”); }

Pointers Pointer variables, simply called pointers, are designed to hold memory addresses as their values. Normally, a variable contains a specific value, e.g., an integer, a floating-point value, or a character. However, a pointer contains the memory address of a variable that in turn contains a specific value.

Pointer Syntax dataType *pointer_name = &variable_name; (You can also initialize it “…= NULL;” or “… = 0;”)  It’s important to initialize pointers to prevent fatal runtime errors or accidentally modifying important data.

Pointers int val = 5; int *val_ptr = &val; 0x3F *val_ptr 0x83 5 val 0x3F name: Value name: location:

Pointers When an ampersand (&) is prefixed to a variable name, it refers to the memory address of this variable. 0x3F *val_ptr &val_ptr = 0x83 5 val &val = 0x3F name: Value name:

Ampersand example #include int main() { char someChar = 'x'; printf(“%p\n", &someChar); system("pause"); return 0; } #include int main() { char someChar = 'x'; printf(“%p\n", &someChar); system("pause"); return 0; } Output: ?????

Ampersand example #include int main() { char someChar = 'x'; printf(“%p\n", &someChar); system("pause"); return 0; } #include int main() { char someChar = 'x'; printf(“%p\n", &someChar); system("pause"); return 0; } Output: 0x02f4c7

Passing variables with pointers void xchng(int*, int*); main() { int a = 5; int b = 3; exchange(&a,&b); [print a and b] } //pass by reference void xchng(int *x, int *y) { [print *x and *y] int temp = *i; int *x = *y; int *y = temp; [print *x and *y] } void xchng(int*, int*); main() { int a = 5; int b = 3; exchange(&a,&b); [print a and b] } //pass by reference void xchng(int *x, int *y) { [print *x and *y] int temp = *i; int *x = *y; int *y = temp; [print *x and *y] } Output: *x = 5, *y = 3 *x = 3, *y = 5 a = 3, b = 5 Output: *x = 5, *y = 3 *x = 3, *y = 5 a = 3, b = 5 void exchange(int, int); main() { int a = 5; int b = 3; xchng(a,b); [(3)print a and b] } //pass by value void xchng(int x, int y) { [(1)print x and y] int temp = x; int x = y; int y = temp; [(2)print x and y] } void exchange(int, int); main() { int a = 5; int b = 3; xchng(a,b); [(3)print a and b] } //pass by value void xchng(int x, int y) { [(1)print x and y] int temp = x; int x = y; int y = temp; [(2)print x and y] } Output: (1) x = 5, y = 3 (2) x = 3, y = 5 (3) a = 5, b = 3 Output: (1) x = 5, y = 3 (2) x = 3, y = 5 (3) a = 5, b = 3 Output: (1) x = 5, y = 3 (2) x = 3, y = 5 (3) a = 3, b = 5 Output: (1) x = 5, y = 3 (2) x = 3, y = 5 (3) a = 3, b = 5

Pointers to Arrays An array variable without a bracket and a subscript represents the starting address of the array. An array variable is essentially a pointer. Suppose you declare an array of integer values as follows: int list[6] = {11, 12, 13, 14, 15, 16}; *(list + 1) is different from *list + 1. The dereference operator (*) has precedence over +. So, *list + 1 adds 1 to the value of the first element in the array, while *(list + 1) dereferences the element at address list[1] in the array.

Pointers to Arrays main() { int list[3] = {10, 3, 5}; int k = 10; k = *list + 1; [print k] } main() { int list[3] = {10, 3, 5}; int k = 10; k = *list + 1; [print k] } Output: k = 11 main() { int list[3] = {10, 3, 5}; int k = 10; k = *(list + 1); [print k] } main() { int list[3] = {10, 3, 5}; int k = 10; k = *(list + 1); [print k] } Output: k = 3

Strings FunctionDescription strlen()Returns numeric string length up to, but not including null character tolower() and toupper()Converts a single character to upper or lower case strcpy()Copies the contents of one string into another string strcat()Appends one string onto the end of another strcmp()Compares two strings for equality strstr()Searches the first string for the first occurrence of the second string

Strings #include main() { char *str1 = “REACH”; char str2[] = “Tutoring”; printf(“\nThe length of string 1 is %d \n”, strlen(str1)); printf(“The length of string 2 is %d\n”,strlen(str2)); } #include main() { char *str1 = “REACH”; char str2[] = “Tutoring”; printf(“\nThe length of string 1 is %d \n”, strlen(str1)); printf(“The length of string 2 is %d\n”,strlen(str2)); } Output: The length of string 1 is 5 The length of string 2 is 8 Output: The length of string 1 is 5 The length of string 2 is 8

Strings #include void convertL(char *); main() { char name1[] = “Barbara Bush”; convertL(name1); } void convertL(char *str) { int x; for ( x = 0; x <=strlen(str) ; x++) str[x] = tolower(str[x]); printf(“\nThe name in lowercase is %s\n”, str); } #include void convertL(char *); main() { char name1[] = “Barbara Bush”; convertL(name1); } void convertL(char *str) { int x; for ( x = 0; x <=strlen(str) ; x++) str[x] = tolower(str[x]); printf(“\nThe name in lowercase is %s\n”, str); } Output: The name in lowercase is barbarabush Output: The name in lowercase is barbarabush

Data File Hierarchy EntityDescription BitBinary digit, 0 or 1Smallest value in a data file ByteEight bitsStores a single character FieldGrouping of bytesi.e a word, social security number RecordGrouping of fieldsa single row of information, student name, age, ID, GPA FileGrouping of records separate fields in a record using spaces, tabs, or commas

Data File Example #include main() { FILE *pRead; char name[10]; pRead = fopen(“names.dat”, “r”); if( pRead == NULL ) printf( “\nFile cannot be opened\n”); else { printf(“\nContents of names.dat\n”); fscanf( pRead, “%s”, name ); while( !feof(pRead) ) { printf( “%s\n”, name ); fscanf( pRead, “%s”, name ); } #include main() { FILE *pRead; char name[10]; pRead = fopen(“names.dat”, “r”); if( pRead == NULL ) printf( “\nFile cannot be opened\n”); else { printf(“\nContents of names.dat\n”); fscanf( pRead, “%s”, name ); while( !feof(pRead) ) { printf( “%s\n”, name ); fscanf( pRead, “%s”, name ); }

Data File Example #include main() { FILE *pRead; char name[10]; char birthdate[9]; float number; char hometown[20]; pRead = fopen(“information.dat”, “r”); if( pRead == NULL ) printf( “\nFile cannot be opened\n”); else { fscanf( pRead, “%s%s%f%s”, name, birthdate, &number, hometown ); while( !feof(pRead) ) { printf( “%s \t %s \t %f \t %s\n”, name, birthdate, number, hometown ); fscanf( pRead, “%s%s%f%s”, name, birthdate, &number, hometown ); } #include main() { FILE *pRead; char name[10]; char birthdate[9]; float number; char hometown[20]; pRead = fopen(“information.dat”, “r”); if( pRead == NULL ) printf( “\nFile cannot be opened\n”); else { fscanf( pRead, “%s%s%f%s”, name, birthdate, &number, hometown ); while( !feof(pRead) ) { printf( “%s \t %s \t %f \t %s\n”, name, birthdate, number, hometown ); fscanf( pRead, “%s%s%f%s”, name, birthdate, &number, hometown ); }

Data Structures Arrays require that all elements be of the same data type. Many times it is necessary to group information of different data types. An example is a list of materials for a product. The list typically includes a name for each item, a part number, dimensions, weight, and cost. C and C++ support data structures that can store combinations of character, integer floating point and enumerated type data. They are called - structs.

Structure Syntax struct listOfCars //elements in a list of cars { int year; char make[10]; char model[10]; char tag[8]; }fleet; //for short we’ll call it a fleet fleet rentals[5]; // five cars that we rent out to clients rentals[0].year = 2008; rentals[0].make = “Honda”; rentals[0].model = “Element”; rentals[0].tag = “AS2395”; […] rentals[4].year = 2015; rentals[4].make = “Tesla” rentals[4].model = “Model S”; rentals[4].tag = “2FST4U”; struct listOfCars //elements in a list of cars { int year; char make[10]; char model[10]; char tag[8]; }fleet; //for short we’ll call it a fleet fleet rentals[5]; // five cars that we rent out to clients rentals[0].year = 2008; rentals[0].make = “Honda”; rentals[0].model = “Element”; rentals[0].tag = “AS2395”; […] rentals[4].year = 2015; rentals[4].make = “Tesla” rentals[4].model = “Model S”; rentals[4].tag = “2FST4U”; fleet vans[3]; //company vans vans[0].year = 2012; vans[0].make = “Ford”; vans[0].model = “EconoVan”; Vans[0].tag = “MV1NUP”; fleet vans[3]; //company vans vans[0].year = 2012; vans[0].make = “Ford”; vans[0].model = “EconoVan”; Vans[0].tag = “MV1NUP”;

Dynamic Memor malloc() calloc() realloc() free() Four functions related to memory allocation that you need to know:

Dynamic Memory Example #include main() //programming for temperature logging device { int *temptime; // temp/time log [HHMMTTT] int hist = 0;// how many readings taken temp = (int *) calloc(10, sizeof(int)); // pre-allocate some memory if (temptime == NULL)// check if it worked send_alert(“Memory failed!”);// send alert if not while (reset_button == “LOW”) {// keep logging until reset if( temp_sense != temptime[hist -1] ) {// check if temp has changed if( hist < 10 ) {// check whether you need memory temptime=realloc(temptime,(sizeof(int)*(hist+10)));// if so, add more memory if (temptime == NULL) { // check if it worked send_alert(“Memory is full!”);// send alert if not break;// and exit process } temptime[hist] = sensor_output;// otherwise, log the temp. hist = hist + 1;// and account for the new entry } store_log(temptime);// save the log elsewhere free(temptime);// free up memory for reset processes to use reset_device();// start the device reset process } #include main() //programming for temperature logging device { int *temptime; // temp/time log [HHMMTTT] int hist = 0;// how many readings taken temp = (int *) calloc(10, sizeof(int)); // pre-allocate some memory if (temptime == NULL)// check if it worked send_alert(“Memory failed!”);// send alert if not while (reset_button == “LOW”) {// keep logging until reset if( temp_sense != temptime[hist -1] ) {// check if temp has changed if( hist < 10 ) {// check whether you need memory temptime=realloc(temptime,(sizeof(int)*(hist+10)));// if so, add more memory if (temptime == NULL) { // check if it worked send_alert(“Memory is full!”);// send alert if not break;// and exit process } temptime[hist] = sensor_output;// otherwise, log the temp. hist = hist + 1;// and account for the new entry } store_log(temptime);// save the log elsewhere free(temptime);// free up memory for reset processes to use reset_device();// start the device reset process }

Thank you! This presentation was provided by REACH – Resources for Academic Achievement