The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
I need help with my week 4 questions in computer science course CS200.
A double is more precise than a float.
 True
 False
QUESTION 2
char is a valid identifier.
 True
 False
QUESTION 3
Which one of these is not a primitive data type? _________________ .
| Â |
int |
|
| Â |
double |
|
| Â |
bool |
|
| Â |
long |
|
| Â |
char |
QUESTION 4
The two floating point data types are _____ and _____
QUESTION 5
String literals are surrounded by _____ quotes
QUESTION 6
By convention, method names, instance variables and object names start with a lowercase letter.
 True
 False
QUESTION 7
When an object reference is first declared, its value is null.
 True
 False
QUESTION 8
By convention, class names start with a capital letter.
 True
 False
QUESTION 9
OOP stands for _________________
QUESTION 10
The operations for a class are called _____
QUESTION 11
The special method that we call when instantiating an object is called a _____
QUESTION 12
API stands for _____
QUESTION 13
An applet is an extension of the JApplet class.
 True
 False
Â
Â
QUESTION 14
Which package is the Graphics class part of? _________________ .
| Â |
javax.swing |
|
| Â |
java.swing |
|
| Â |
java.awt |
|
| Â |
javax.awt |
|
| Â |
java.graphics |
QUESTION 15
Which applet method is called automatically when the applet needs to redraw itself? _________________ .
| Â |
init |
|
| Â |
main |
|
| Â |
paint |
|
| Â |
exit |
|
| Â |
applet |
QUESTION 16
What is an applet viewer?
QUESTION 17
Complete the code, changing the color of the Graphics reference g to a color with red=100, green=200, blue=60
public void paint( Graphics g )
{
// your code goes here
} Â Â
Â
Â
Â
QUESTION 18
Complete the code, drawing a line between points (100, 200) and (34, 67)
public void paint( Graphics g )
{
// your code goes here
}
Â
QUESTION 19
The 4 relational operators, >, >=, <, <= are binary operators.
 True
 False
Â
QUESTION 20
( a> 3 ) is equivalent to _________________ .
| Â |
a < 3 |
|
| Â |
a <= 3 |
|
| Â |
!a < 3 |
|
| Â |
!a <= 3 |
|
| Â |
!( a <= 3 ) |
Â
Â
Â
Â
Â
Â
Â
Â
QUESTION 21
What is the output of the following code? _________________ .
int age = 30;
if ( age > 33 )
System.out.print( 1 );
else
System.out.print( 2 );
System.out.println( 3 );
| Â |
1 |
|
| Â |
2 |
|
| Â |
12 |
|
| Â |
123 |
|
| Â |
23 |
QUESTION 22
When we use a while loop, we always know in advance how many times the loop body will be executed.
 True
 False
QUESTION 23
When reading data from a file using a while loop, the typical condition to exit the loop is when ___________.
| Â |
We have read the first value in the file |
|
| Â |
We have read 100 values in the file |
|
| Â |
We have reached the end of the file |
QUESTION 24
Write a loop to output the word EXAM 99 times
Â
QUESTION 25
Write a loop to calculate the total of all the numbers between 100 and 200 included (i.e. 100 + 101 + … + 199 + 200); output the total.
|
 |
Â
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly