本文出處:IB培訓(xùn) 發(fā)布時(shí)間:2020-07-29 14:41:05 字體大?。? A+ A-
計(jì)算機(jī)作為當(dāng)前最被看好的一大專業(yè)領(lǐng)域,很多同學(xué)們?cè)贏P課程學(xué)習(xí)期間會(huì)選修AP計(jì)算機(jī)科學(xué)這門(mén)課來(lái)幫助自己打好知識(shí)基礎(chǔ)。今天A+國(guó)際教育小編就帶大家梳理一下各章節(jié)中AP計(jì)算機(jī)知識(shí)點(diǎn)內(nèi)容,來(lái)幫助同學(xué)們更為系統(tǒng)地開(kāi)展AP計(jì)算機(jī)科學(xué)的學(xué)習(xí)和備考工作。
1. Introductory Java Language Features
Package And Classes 類和包
public class FirstProg // file name is FirstProg.java { public static type1 method1 (parameter list) {} public static type2 method2 (parameter list) {} ...... public static void main (String[] args) {} }
All java methods must be contained in a class; all program statement must be placed in a method
The class that contains the main method does not contain many additional methods.
reserved words (Keywords): class, public, static, void, main.
public: the class or method is usable outside of the class
static: methods that will not access any objects of a class. The main method must always be static.
Types And Identifiers 標(biāo)識(shí)符和類型
Identifiers 標(biāo)識(shí)符
Identifier: name for a variable, parameter, constant, user-defined method, user-defined class
cannot begin with a digit
Lowercase: for variables and methods
Uppercase: separate into multiple words e.g getName, findSurfaceArea
a class name starts with a capitol letter
Built-in Types 內(nèi)置類型
int - 整數(shù) boolean - true or false double - 小數(shù)
Storage of Numbers 數(shù)值儲(chǔ)存
Integers 整數(shù) binary Integer.MAX_VALUE == 2^31-1 Integer.MIN_VALUE == - 2^31 Floating-Point Numbers 浮點(diǎn)數(shù) float & double
sign * mantissa * 2^exponent
round-off error - when floating-point numbers are converted into binary, most cannot be represented exactly
e.g 0.1*26 ≠ 0.1+0.1......(26 terms)
NaN"not a number" - undefined number
Hexadecimal Numbers 十六進(jìn)制數(shù)
conversion between hex and binary 5 hex = 0101 bin F hex = 1111 bin 5F hex = 01011111 bin
Final Variable Final變量
user-defined constant
keyword final
e.g. final double TAX_RATE = 0.08;
final variable can be declared without initializing it immediately, but can only be given just once
array bound
final int MAXSTUDENTS = 25;
int [] classList = new Int[MAXSTUDENTS];
Operators 運(yùn)算符
Arithmetic Operators 算數(shù)運(yùn)算符
+ addition - subtraction * multiplication /devision %mod(remainder)
Relational Operators 關(guān)系運(yùn)算符
== equal to != not equal to > greater than < less than >= greater or equal to <= less than or equal to
Relational Operators can only be used in comparison of primitive types.
User defined types : equals, compareTo methods
floating-point should not be compared directly using relational operators.
Logical Operators 邏輯運(yùn)算符
! NOT && AND || OR Short-circuit evaluation evaluated from left to right evaluation automatically stops as soon as the value of the entire expression is known
Assignment Operators 賦值運(yùn)算符
Compound assignment operators : = += -= *= /= %=
Increment and Decrement Operator 遞增遞減運(yùn)算符
++ --
Operator Precedence 運(yùn)算符的優(yōu)先級(jí)
!, ++ , -- right to left
* , / , % left to right + , - left to right <,>, <=,>= left to right == , != left to right && || =, +=, -+, *=, /=, %= right to left
Input/Output 輸入輸出
Escape sequences 轉(zhuǎn)義字符
\n newline \" double quot \\ backslash
Control Structures 控制結(jié)構(gòu)
Decision-Making Control Structures 條件結(jié)構(gòu)
if...
if...else...
nested if
extended if (if...elseif...)
Iteration 循環(huán)結(jié)構(gòu)
for loop
for (initialization; termination condition; update statement)
The termination condition is tested at the top of the loop
the update statement is performed at the bottom
loop variable should not have its value changed inside the loop body
the scope of the loop variable can be restricted to the loop body by combining the loop variable declaration with the initialization.
for-each loop
for (SomeType element : collection)
cannot be used to replace or remove elements
hides the index variable that is used with array
while loop
while (boolean test)
以上就是A+國(guó)際教育小編關(guān)于部分AP計(jì)算機(jī)科學(xué)知識(shí)點(diǎn)內(nèi)容的梳理,當(dāng)然由于篇幅有限,小編只更新了部分內(nèi)容,其余部分將在接下來(lái)幾天中列舉。歡迎持續(xù)關(guān)注喲!
本章來(lái)源:AP知識(shí)點(diǎn)
課程類別:ap課程科目
本章標(biāo)題:各章節(jié)AP計(jì)算機(jī)科學(xué)知識(shí)點(diǎn)梳理(上)
文本地址:http://iemv.cn/article_query/id/3153
了解更多:AP計(jì)算機(jī)科學(xué)知識(shí)點(diǎn) | AP計(jì)算機(jī) |
版權(quán)所有 轉(zhuǎn)載時(shí)請(qǐng)您以鏈接形式注明來(lái)源!