CSCE 121 Midterm: CSCE 121 Test 2 Spring 2017

8 Pages
77 Views
Unlock Document

Department
Computer Sci. & Engr.
Course
CSCE 121
Professor
Daugherity Walter
Semester
Fall

Description
Name: CSCE. 121 TEST2 March 23, 2017 Dr. D lie, ch ho d An Aggi Aggie Code INSTRUCTIONS: departm CSCE) Include SCANTRON fully with a No. 2 p Mark d UIN. Also fi e, y and today's date NOTE: F gna y y b ailab b. F h q ect the BEST Mark ye the S h q technically t, but th BEST All undeclared variables are ints. to th in the COMPLETED EXAM with the SCANTRON SHEET d. Ti Each correctly answered question is worth 2points. l. Screen coordinates use (1.1) to designate a) the top left comer of the display b the bottom left corner of the display the dr the top left d) the top left comer of the title bar of a window none of the above The draw lines0 function in the Shape class connecting the points draws by b is all that Open poly needs to be drawn correctly must be overridden in Closed polyline d) all of the abo none of the above Which one of the following is true regarding the display model? Windows are attached to objects such as graphs displayed by send ble0 h as Rectangle ad to the to the di graphics library, display 0 gir ttached. be changed after th The text in a Te specified by PG a GIF image c) a vector of JPG image a vector of GIF images none of the above Given int f the type of f? an int initialized by the default constructor b) function returning an int c) an int returning a function depends on how fis defined the ab key a) functional programming object-oriented programming c) declarative programming d) A and B A and C 7. Will the following code fragment compile Yes, since there is only one initialization defi c) No, it should be int x15); d) Yes, since there are two declarations none of the a garding the Ci Which All the ts on the f poi nherited. hap red in the The locati Circle is specified by the top left the b ding bo specified by the fo g b points inherited from Sha y po the abov Th a is used to pass arguments to functions is used to allocate global variables c is allocated by push back and deal by pull back d) all of the above e) none of the above 10. C++ header files allow users to a) specify declarations b) specify constants defi d A and B A and C Name: CSCE. 121 TEST2 March 23, 2017 Dr. D lie, ch ho d An Aggi Aggie Code INSTRUCTIONS: departm CSCE) Include SCANTRON fully with a No. 2 p Mark d UIN. Also fi e, y and today's date NOTE: F gna y y b ailab b. F h q ect the BEST Mark ye the S h q technically t, but th BEST All undeclared variables are ints. to th in the COMPLETED EXAM with the SCANTRON SHEET d. Ti Each correctly answered question is worth 2points. l. Screen coordinates use (1.1) to designate a) the top left comer of the display b the bottom left corner of the display the dr the top left d) the top left comer of the title bar of a window none of the above The draw lines0 function in the Shape class connecting the points draws by b is all that Open poly needs to be drawn correctly must be overridden in Closed polyline d) all of the abo none of the above Which one of the following is true regarding the display model? Windows are attached to objects such as graphs displayed by send ble0 h as Rectangle ad to the to the di graphics library, display 0 gir ttached. be changed after th The text in a Te specified by PG a GIF image c) a vector of JPG image a vector of GIF images none of the above Given int f the type of f? an int initialized by the default constructor b) function returning an int c) an int returning a function depends on how fis defined the ab key a) functional programming object-oriented programming c) declarative programming d) A and B A and C 7. Will the following code fragment compile Yes, since there is only one initialization defi c) No, it should be int x15); d) Yes, since there are two declarations none of the a garding the Ci Which All the ts on the f poi nherited. hap red in the The locati Circle is specified by the top left the b ding bo specified by the fo g b points inherited from Sha y po the abov Th a is used to pass arguments to functions is used to allocate global variables c is allocated by push back and deal by pull back d) all of the above e) none of the above 10. C++ header files allow users to a) specify declarations b) specify constants defi d A and B A and CA Polyg graph brary a is the same as an Open polyline. b) is the same as a Closed polyline e) verifies that its edges do not intersect is used to draw circles by specifying hundreds of tiny lines the abo The same name may be used for two different items if Dd) they are declared in different namespaces b) they are declared in different for statements c they are declared in different functions the ab e) none of the above A b a) used to connect two rectangles oby used to connect two actions c) a rectangle with an associated action y of the ab e) none of the above The Shap keeps track of the number of classes derived from Shape c) keeps track of the number of Shape objects d) all of the above Definiti a) are also declarations are not declarations c) completely specify an identifier d) A and B J6. Builtin C++ types like int and char a) are initialized to a default value b) can only be initialized with c) can only be initialized with can only be initialized with V e none of the above arge ob being passed all by c) all by value is the safest B and C 8, Which one of the following is true regarding "Points" in each class? Each d fr the Shape b) Each Point in an object derived from Shape may have a different color. c)Open polyline allows any number of Points to be added. none of the above hg. In the following statement B A aslass B is a subclass of class A class A is a subclass of class B c class B is derived from base class A A and B and C 0. Given int fint x a the code can return a double but not an int b)the code can return either an int or a double if the code d 0; the d)all of the above one of the above 21. What does the following mean? & y a) y is a double logically ANDed with x b)x has two types, both d Oy is a reference to a double A and B B and C 22-23. Fi "constexpr is changed. at compile time to either (2 c) constant expression d) blank d) 32 24/12 A Polyg graph brary a is the same as an Open polyline. b) is the same as a Closed polyline e) verifies that its edges do not intersect is used to draw circles by specifying hundreds of tiny lines the abo The same name may be used for two different items if Dd) they are declared in different namespaces b) they are declared in different for statements c they are declared in different functions the ab e) none of the above A b a) used to connect two rectangles oby used to connect two actions c) a rectangle with an associated action y of the ab e) none of the above The Shap keeps track of the number of classes derived from Shape c) keeps track of the number of Shape objects d) all of the above Definiti a) are also declarations are not declarations c) completely specify an identifier d) A and B J6. Builtin C++ types like int and char a) are initialized to a default value b) can only be initialized with c) can only be initialized with can only be initialized with V e none of the above arge ob being passed all by c) all by value is the safest B and C 8, Which one of the following is true regarding "Points" in each class? Each d fr the Shape b) Each Point in an object derived from Shape may have a different
More Less

Related notes for CSCE 121

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit