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

CS105 Ch.1 Intro to Java Question and answers 100% correct 2025

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
02-05-2025
Written in
2024/2025

CS105 Ch.1 Intro to Java Question and answers 100% correct 2025 program - correct answers consists of instructions executing one at a time. A program starts in main(), executing the statements within main's braces { }, one at a time. Each statement typically appears alone on a line and ends with a semicolon, as English sentences end with a period. The programmer-created sequence of instructions is called a program, application, or just app. basic instruction types - correct answers input, process, and output input - correct answers A program gets data, perhaps from a file, keyboard, touchscreen, network, etc. process - correct answers A program performs computations on that data, such as adding two values like x + y. output - correct answers A program puts that data somewhere, such as to a file, screen, network, etc. variable - correct answers Programs use variables to refer to data, like x, y, and z computational thinking - correct answers creating a sequence of instructions to solve a problem, will become increasingly important for work and everyday life algorithm - correct answers A sequence of instructions that solves a problem

Show more Read less
Institution
CS105 Ch.1 Intro To Java
Course
CS105 Ch.1 Intro to Java









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

Written for

Institution
CS105 Ch.1 Intro to Java
Course
CS105 Ch.1 Intro to Java

Document information

Uploaded on
May 2, 2025
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS105 Ch.1 Intro to Java Question and
answers 100% correct 2025
program - correct answers consists of instructions executing one at a time. A
program starts in main(), executing the statements within main's braces { },
one at a time. Each statement typically appears alone on a line and ends with
a semicolon, as English sentences end with a period. The programmer-
created sequence of instructions is called a program, application, or just app.


basic instruction types - correct answers input, process, and output


input - correct answers A program gets data, perhaps from a file, keyboard,
touchscreen, network, etc.


process - correct answers A program performs computations on that data,
such as adding two values like x + y.


output - correct answers A program puts that data somewhere, such as to a
file, screen, network, etc.


variable - correct answers Programs use variables to refer to data, like x, y,
and z


computational thinking - correct answers creating a sequence of instructions
to solve a problem, will become increasingly important for work and everyday
life


algorithm - correct answers A sequence of instructions that solves a problem

, scanner - correct answers is a text parser that can get numbers, words, or
phrases from an input source such as the keyboard. The following code at the
top of a file enables the program to get input: import java.util.Scanner; Getting
input is achieved by first creating a Scanner object via the statement: Scanner
scnr = new Scanner(System.in);. System.in corresponds to keyboard input.
Then, given Scanner object scnr, the following statement gets an input value
and assigns x with that value: x = scnr.nextInt() ;


basic input - correct answers Programs commonly get input values, perform
some processing on that input, and put output values to a screen or
elsewhere. Input is commonly gotten from a keyboard, a file, fields on a web
form or app, etc.
The following code at the top of a file enables the program to get input: import
java.util.Scanner;


Basic output: Text - correct answers The System.out.print construct supports
output. Outputting text is achieved via: System.out.print("desired text");. Text
in double quotes " " is known as a string literal. Multiple output statements
continue printing on the same output line.


newline - correct answers System.out.println (note the ln at the end, short for
"line"), starts a new output line after the outputted values, called a newline. A
common error is to type the number "1" or a capital I, as in "in", instead of a
lower case l as in "print line". A new output line can also be produced by
inserting \n, known as a newline character, within a string literal. Ex:
Outputting "1\n2\n3" outputs each number on its own output line. \n consists
of two characters, \ and n, but together are considered as one newline
character. Good practice is to use println to output a newline when possible,
as println has some technical advantages not mentioned here.


outputting a variable's value - correct answers Outputting a variable's value is
achieved via: System.out.print(x); Note that no quotes surround x. println()
could also be used.

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.
STUVIAMAESTRO254 Florida State University
View profile
Follow You need to be logged in order to follow users or courses
Sold
158
Member since
2 year
Number of followers
98
Documents
9338
Last sold
3 days ago
Academic Excellence Hub

At Academic Excellence Hub, we specialize in providing premium academic exam solutions for university students and institutions. Our carefully curated collection of assessments ensures academic excellence, preparation mastery, and success in competitive environments. We pride ourselves on delivering reliable, confidential, and high-quality exam resources tailored to meet the highest academic standards. Empower your academic journey with trusted expertise and unparalleled service.

Read more Read less
2.5

41 reviews

5
4
4
10
3
7
2
2
1
18

Recently viewed by you

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