First Coding Book
Bit — 0 or 1 unit
1 Byte = 8 bit
Code —promised meaning of combination of 0 or 1
ASCII code < UNICODE
Compile = Java Code translate into computer language (ex:001010)
Program language
- C, Java — all at once translation
- Script language — instant translation ex)JavaScript, Python
- Markup language — frame setting and layout guide ex)HTML
Property item : bird — length of wing,length of beak, color of feather
Property value — — — 30 cm, 3 cm, black
Dot (~의)
Bird Nabi; — — — — — -class, name
Nabi.length of wing = “30cm” ;— —name.property item = “property value”
= mean is order, == mean equal
In programming, name mean ID(identity)
Variable(Storing various values), Method(defining Action)
Variable example : char ABC = ‘가’;
Basic Variable- int(integer), double(real number), char(character), boolean(T/F)
String — not basic variable so Must use “__ ”
ex) String greeting = “Hello”;
Method
int 더하기(int 숫자1, int 숫자2){
___int 결과;
___결과 = 숫자1+ 숫자2;
___return 결과;
}
void — use when you don’t need return value
ex) void int 더하기 (int 숫자1, int 숫자2){
Main Method, Sub Method — — function order__Main>Sub
Main(){ — — — — — — — — — Main Method
____TOFEL();
____SOP();
____Portfolio();
}
TOFEL() { — — — — — — — — —Sub Method
}
Conditional Sentences : if, else, else if
if (SOP == ‘y’ {
________System.out.print(“Stop Studying English”);
}else if ( Portfolio == ‘y’ ){
________System.out.print(“Letters of Recommendation”);
}else{
________System.out.print(“Focus on Portfolio”)
a == 10 ____ equal to
a > 10 ____ greater than
a <= 10
a >= 10____ greater than or equal to
a != 10____ not equal
&& ___ and
|| ___ or
+=1 equal to ++
Repetitive statement =while, Conditional Repetitive Statement = for
for (int day = 1; day <= 1905; day = day + 1){
___wake up;
___shower;
___study;
___sleep;
}
\n — — newline
\b — — backspace
\s — — space
\t — — tab
“\n”______ “ ”
//comment /* long comment */
class = classification(분류) = module
instance = individual products
package elice;
class GraduateSchoolApplication{
____int TOFEL;
____int SOP;
____int LOR;
}
package elice;
public class GSApplication{
_____public static void main(String[] args){
________GSApplication UnivBerkeley = new GSApplication();
________UnivBerkeley.TOFEL = 90;
________UnivBerkeley.SOP = 800;
________UnivBerkeley.LOR = 3;
___}
}
Constructor — shorten repetitive expression
________GSApplication UnivBerkeley = new GSApplication(90, 800,3);
this — — use for distinction between class and instance
int 칫솔;
___this.칫솔 = 칫솔;
Super class, Sub class
class 특별세트 extends 참치선물세트{
}
Override(set inside of set) vs Overloading( same method different variable)
“Package” consist of Classes
package ABC_Company;
class 햄선물세트{
}
Access Modifier — public, private, protected
public — free
private — relevant variable, method
protected — same package
Array