DOC PREVIEW
WVU CS 110 - Review Sheet, CS 110

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Review Sheet, CS 110Exam 1, Friday 2/21/2020Chapters 1, 2, 4, static methodsI. Chapter 1: All SectionsA. TermsB. TopicC. End of chapter questions:II. Chapter 2: All SectionsA. TermsB. TopicC. End of Chapter Questions:III. Chapter 4: All Sections: excluding printfA. TermsB. TopicsC. End of chapter questions:IV. Methods -- from my lecture on methodsA. TermsB. TopicsReview Sheet, CS 110Exam 1, Friday 2/21/2020Chapters 1, 2, 4, static methods I. Chapter 1: All SectionsA. TermsHardware Software CPUMain Memory Secondary Storage Machine CodeBinary High Level Programming LanguageCompiler Interpreter Hybrid InterpreterSyntax error logic error AlgorithmBinary Digit (bit) byte wordCompiler InterpreterB. Topico Understand the basic outline and structure of a Java programo Why is the main function important?o You should know how to use print and printlno You need to know how to convert an integer number to binaryo Given an invocation of a method ie: System.out.println(“Hi”); You should recognize that System.out refers to an object, println a method and that “Hi” isa argument to the println method.o What is the importance of System.out and System.in, what do they refer to?o You should be able to recognize syntax errors in code. o Given a problem you should be able to write an algorithm in pseudocode for the problemC. End of chapter questions:o R1.1 - R1.5, R1.7, R1.8, R1.9, R1.11, R1.12 - R1.14o E1.1 - E1.4o P1.1 - P1.3, P1.6II. Chapter 2: All SectionsA. TermsClass Object MainVariable Declaration variable initializationScope Variable type identifiersreserved words integer floating point numbercharacter string literalcomment assignment expressionPublic interface method method argumentsreturn values void accessor methodmutator method package primitive type variablereference type variableB. Topico You should be able to declare variables of the primitive types.o You should be able to declare and use stringso You should be able to identify a “type mismatch” to identify when the wrong type is assigned to a variableo You should be able to use the String methods discussed in class in in the lectures on eCampuso You should be know the difference between static, and instance methodso You should know how to use class String, and it’s methodso You should know how to use class Math and it’s methodso You should understand print and println.o If I have a variable of type String, what method from class String would I use to: get the length of the String get the character at index 8 find the index of the first blank space find the index of the last blank space find the beginning index of the substring “cat” extract the portion of the string from index 3 to 9 extract all of the string from index 8 to the end of the string convert the string to all upper case (or lower case) replace all occurrences of an ‘a’ with ‘o’C. End of Chapter Questions:o R2.1 - R2.11, R2.20III. Chapter 4: All Sections: excluding printfA. Termsexpressions assignment operators magic numberincrement/decrement operators operandsStrings String inputB. Topicso You should be able to write expressionso You should be able to Calculate the value of expressionso Determine if an assignment is valid, based on the value of an expressiono You should be able to trace through some code and give the outputo You should know that constants, once initialized, cannot be assigned a new value (final variables) Why where would you use constants? How do you declare constantso You should understand the precedence and Associativity of arithmetic operatorso You need to understand integer dividion; IE 5/2 = 2 NOT 2.5o You should be able to understand and use basic methods from class Math: pow, sqrt, max, min, roundo given an algebraic expression you should be able to write an equivalent COMPILABLE java expression.o You should understand casting.o For class Scanner you must know how to: You should be able to use class Scanner to receive keyboard input, see the supplemental lecture on eCampus Know the difference between calls to next() and nextLine() Know how to read numeric input from the keyboard with nextInt(), nextFloat, nextDouble etc..o For class String: you should understand all the methods discussed in class and used in lab: indexOf, substring, concat, length, replace, toUpperCase, & toLowerCase You must be able to correctly call a constructor to create an instance ofclass String Name accessor and mutator methods from class StringC. End of chapter questions:o R4.1 -R 4.16o E4.1 - 4.13o P4.2, P4.3, P 4.8, P4.9IV. Methods -- from my lecture on methodsA. Termsmethod method call calling programactivation activation record formal parametersarguments call by value local variablesB. Topicso You should be able to trace the execution of a methodo What is the return type of a method that doesn’t produce a value?o How many values can be returned by a return statement.o What does the return statement do?o You should be able to call static user defined methodso You should understand the difference between formal parameters – in method specifications, and actual parameters in method callso Given a method specification, you should be able to evaluate a “call” to the method, and determine if it is syntactically correct.o Given the specification for a method, you should be able to write a correct callto the method.o Know the 4 benefits of using methods in programso Given a problem description you should be able to write a simple method. Cuts the string in 1/2, reverses the halves and returns the new string given the radius of a circle, returns the area, or circumference of the circle calculates the volume, area, or perimeter of a


View Full Document

WVU CS 110 - Review Sheet, CS 110

Download Review Sheet, CS 110
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Review Sheet, CS 110 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Review Sheet, CS 110 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?