stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Understanding Structures and Classes Flashcards | StudBud
Explore
/
Understanding Structures and Classes
Understanding Structures and Classes
15 terms
·
StudBud Administration
·
8 plays
Computer Programming 2 Mr. Lockamy's class
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
How would you play the sound “moo” in code.
Play(moo);
moo.Play();
moo(Play);
moo.Play;
2
Classes and structs are ______
Contained in no coding
Contained in namespaces
Contained in ANA coding
contained in null coding
3
What is a useful class in the .NET Library for string?
DrawEllipse
Abs
PlayLooping
CompareTo
4
Two variables can refer to the same class.
False
Maybe
True
5
What are brushes used for in c#.
None of the other answers are correct
To fill in rectangles and ellipses.
Draw Lines
Paint with your cursor.
6
What is the output of: int x = 4.3; int y = 6.7; int min = (int) Math.Min(x, z);
4
4.3
6.7
6
7
Structures and classes are _____
Passed by ref
Not central concepts in object oriented programming
Central concepts in binary code
Central concepts in object oriented programming
8
Classes are passed by ____
by
rec
ref
val
9
What three objects are most commonly used to draw in C#?
ObjectGraphic, Comb, Sweep
CreateGraphic, Pencil, Brush
GraphicObject, Pencil, Brush
GraphicObject, Pen, and Brush
10
Which of these is a proper way to instantiate a struct
stu1name=Cindy;
stu1.name=“Cindy”
stu1.name=“Cindy”;
stu1.name=Cindy;
11
Do structs support inheritance?
yes
Maybe
No
Only in select cases
12
What is the difference between object created from classes vs structs?
Classes do not use the keyword new during instantiation
Structs do not use the keyword new during instantiation
There is no difference when creating an object.
Structs do use the keyword new during instantiation
13
In “myGraphicObject.FillRectangle(myBrush, x)” What would W be?
(x1,x2, y1, y2)
(x, y)
(x1, y1, x2, y2)
(x, y, z)
14
What does String.IndexOf(“a“) do in code?
Finds the length of the string
Finds the first “a” in the string.
Finds the last “a” in the string.
Finds the location of all the “a”s in the string.
15
Are classes and structures codes similar?
True
Maybe
False