Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12COSC 181 – Foundations of Computer ProgrammingClass 12 – Review Test for Exam #1House KeepingAssignment 4 is due 1 Week From TodayExam #1 is FridayToday, we will have a reviewExam Prep in GeneralHow to pass the test (short version)Make sure you understand the concepts and examples in the book (Chapters 1-4)Pay special attention to the elements from the chapters that have been highlighted in class slides and homework assignmentsTypes of QuestionsCode TracingValues of a and b when the loop endsint a = 0;int b = 10;while (b > 0){ a = a * b; --b;} • Code Tracing•Find the error(s) in the codeif(a=b); cout << a << endlSyntax matters, close enough isn’t close enoughWrite pieces of codeWrite a loop (along with any necessary variable declarations) that does …Multiple ChoiceWhich is correct …Short answer:What does “case-sensitive” meanWhat is the difference between a class’s interface and its implementationReview of key topicsTalked about what objects areHow objects relate to classes in C++2 kinds of errorsRun-time and compile-time Basic componentsInput and output streamsSending output to the monitorGetting input from the keyboardHow to include library filesEtcEscape sequencesVariable declarationsTypeNameRelation to computer memoryMethods for variable assignmentVocabulary:Fundamental typesIdentifiersArithmetic OperatorsRelational and Equality OperatorsOperator PrecedenceRequirements SpecificationUML Diagrams (3 kinds)Use CaseClassActivityClassesclass keyword class nameHow to write functions in classesReturn typeNameParameters Parameter typeParameter nameClass attributesFunction Definition vs Function CallPrivate vs publicConstructors Explicit DefaultUsing StringsStrings vs charHow to use a header fileHow to separate interface from functionalityWhy do this?if-else statementsNested if-else statementsTernary conditional operator3 types of control structuresSequenceSelection RepetitionStructures combined in 2 waysStackedNestedwhile loopsCounter controlledSentinel value controlledPseudocodeTop-down, step-wise refinementCastingStudent FeedbackAny questions from you?Anything you need
View Full Document