Spring R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Final Exam ReviewFinal Exam Review –Assessment –Exam Format –C –Matlab
Spring R. Smith - University of St Thomas - Minnesota Assessment Is this class is teaching you what it should?Is this class is teaching you what it should? How can UST answer this?How can UST answer this? –Involves course objectives –The Department is implementing a strategy to assess students’ achievement of course objectives –Specifically: exam questions Course ObjectivesCourse Objectives –Understand programming languages (C) and application packages (Matlab) and their differences –Write programs in C; solve problems in Matlab –Alternative methods of solving the ‘same’ problems, assessing effort, effectiveness, machine efficiency –Assess appropriate use of computer tools (languages, applications) to solve a particular problem
Spring R. Smith - University of St Thomas - Minnesota Assessment Topics for the Exam Write programs in C; solve problems in MatlabWrite programs in C; solve problems in Matlab Differences between C and MatlabDifferences between C and Matlab –Compiled versus interpreted –Little program (.exe) runs by itself vs.m file with Matlab –Different syntaxes – Different error detection Assessing Differences for ‘same’ problemAssessing Differences for ‘same’ problem –effort, –effectiveness, –machine efficiency Assess appropriate use of languages vs applications to solve particular problemsAssess appropriate use of languages vs applications to solve particular problems –Which is “best” ??
Spring R. Smith - University of St Thomas - Minnesota Final Exam Format Same as other examsSame as other exams Open book – no notesOpen book – no notes –Except for notes IN your book (written or Post-its) Written short answersWritten short answers Written programs and functionsWritten programs and functions
Spring R. Smith - University of St Thomas - Minnesota C on the Final General programmingGeneral programming –Basic structure: use of “main”, braces, “return” –Using variables, especially int, double, and strings –Assignment statements and calculations, parentheses –Control structures: if, else, else if, for, while Using VariablesUsing Variables –Declare, define (for structs), initialize, use Input/output and #include Input/output and #include –Printf for integers, strings, doubles –Scanf for integers –Reading text with getchar() in a loop
Spring R. Smith - University of St Thomas - Minnesota C: Functions and Arrays Defining and using simple functionsDefining and using simple functions –Declaring, using a parameter list, returning the result –Calling a function, using the result Numeric arrays (int, double)Numeric arrays (int, double) –Declaring them –Passing them to functions –Array indexing; Finding a particular value –Comparing two 1D arrays Strings – arrays of charsStrings – arrays of chars –Declaring, passing to functions –Comparing strings –Looking for a particular character Structs: we covered them on the last examStructs: we covered them on the last exam
Spring R. Smith - University of St Thomas - Minnesota Matlab Syntax for calculationsSyntax for calculations –Translating math expressions into Matlab (notably summations) –Syntax for 1D vectors –Syntax for 2D matrices Vector calculationsVector calculations –Building a vector from integers –Indexing –Adding data to a vector –Removing data from a vector Writing a functionWriting a function –Syntax of the function header –Returning one or more values –Control structures
Spring R. Smith - University of St Thomas - Minnesota
Spring R. Smith - University of St Thomas - Minnesota Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.