100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CMSC 255 : INTRO TO PROGRAMMING FINAL (CHAPTER 1 - 12) QUESTIONS AND ANSWERS, RATED A+| latest update 2024/25|

Rating
-
Sold
-
Pages
21
Grade
A+
Uploaded on
09-05-2024
Written in
2023/2024

CMSC 255 : INTRO TO PROGRAMMING FINAL (CHAPTER 1 - 12) QUESTIONS AND ANSWERS, RATED A+ Which of the following lines of code correctly writes "Hello" to the screen? - - Sln("Hello"); Fill in the blanks in the main method code below: - -public static void main (String[] args) The class name does not have to be the same as the filename in a Java program. - -false The command to compile a Java program is: [a] H. - -javac Logic errors are the hardest errors to find. - -true While running a program, it unexpectedly stops. What type of error is that? - -runtime What does the virtual machine do? - -runs byte code AND runs the class file Explain the steps that need to happen to take code from it being written to it running and producing output. - -1. The first step is to write a detailed pseucode for the code. 2. The second step is to make sure that the first letter of the class name is capitalized. (ex. public class Quiz_1) 3. The third step is to write the main method after writing the class name. 4. After the main method is written you need to assign an appropriate variable needed to compute the output. 5. After assigning the variable you need to let the compiler know what is it that you're trying to do. 5. The final step is to display the output to the screen which is done by Sln(" ") ; 6. Make sure your code compiles and runs properly. What is a variable? - -A variable is used to store data and and computation results in the program. Name two primitive Java data types that represent whole numbers. - -int, byte Name two primitive Java data types that represent floating-point numbers. - -double, float For each error shown below state if it is a compile-time error, run-time error, or no error: 1. ln("Greetings, Planet Earth!"); 2.Sln("Hello World!") distance = ; 4.Sln(50 / 0); 5.S(23 % 144); 6. Int x = 43; - -1. compile-time 2. compile-time 3. compile-time 4. run-time 5. no error 6. compile-time What is displayed in the following code segment

Show more Read less
Institution
CMSC
Course
CMSC










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CMSC
Course
CMSC

Document information

Uploaded on
May 9, 2024
Number of pages
21
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Terryl Cornell College
View profile
Follow You need to be logged in order to follow users or courses
Sold
128
Member since
2 year
Number of followers
39
Documents
8392
Last sold
3 weeks ago

3.3

16 reviews

5
2
4
7
3
3
2
1
1
3

Trending documents

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions