Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 3 pages
Summary

Summary terms Introduction to Programming (FEB21011X)

Document preview thumbnail
Preview 1 out of 3 pages

Comprehensive list of terms and code of Introduction to Programming (econometrics EUR)

Content preview

int variable integer
double variable for fraction
char variable for single character
String variable for text
boolean variable for true of false statement
final int … variable from which the value can’t be changed, variable in capitals

Math.pow(a,b) a to the power of 3
Math.sqrt(a) the square root of a
Math.sin/cos/tan(a) the sine / cosine / tangent of a
Math.PI the number 𝜋
Math.round(a*b) rounds of the answer
Math.log(a) the natural logarithm of a
Math.exp(a) e to the power of a
Math.max/min(a,b) the maximum / minimum value of a and b
Math.abs(a) the absolute value of a
aEb is equal to 𝑎 ∗ 10!
a%b a divided by b, the remainder term is given
a ++ is equal to a = a + 1

int a = (int) b convert variable b from one type to integer
“…” + “…” + X combine variables and text
X.substring(a,b) take a portion of string X, a is the starting index, b the end index (exclusive)
X.substring(a) take a substring of X, starting from index a, to the end
X.length() take the length of a string
X.charAt(a) the character at spot a of X is taken as ascii code
Scanner in = new Scanner(System.in) needed for reading line
in.nextInt() read the integer
in.nextDouble() read the double
in.next() read the string
in.nextLine() read the line
in.hasNextInt() check if the entered value is an integer
X.isEmpty check if the value of X is empty
X.toLowerCase() will get rid of all the capitals in the string X
\u20AC euro sign, placed inside “ “
\n an enter, placed inside “ “
(“%5.2f”, X) will place the floating number X after 5 spaces and rounded off to 2 decimals,
placed after System.out.printf
(“%5d/s”, X) will place the integer / string X after 5 spaces
Integer.parseInt(X) will change the string number X to an interger

X == Y check if X and Y are the same (will be true or false)
X>/<Y check if X is larger / smaller than Y (will be true or false)
X >= / <= Y check if X is equal or larger / smaller than Y (will be true or false)
X != Y check if X is not equal to Y (will be true or false)
X.equals(“…”) check if the string X contains the text “…” (will be true or false)
A && B check if A and B are true (will be true or false)
A || B check if A or B is true or both true (will be true or false)
!A will change A from to true to false if A was true, or the other way around

int/String/double[] A; create an array called A containing integers / strings / doubles
int[] A = new int[a]; create an array called A containing ‘a’ integers
int[] A = {a, …}; create an array called A with the elements ‘a, …’

Document information

Study
Uploaded on
September 4, 2022
Number of pages
3
Written in
2019/2020
Type
Summary
$7.70

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
LeonVerweij
2.7
(3)
Sold
34
Followers
19
Items
28
Last sold
2 months ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions