1
0
mirror of https://gitlab.com/magicalsoup/Highschool.git synced 2025-01-23 16:11:46 -05:00

Create Computer Science.md

This commit is contained in:
Soup 2019-01-16 12:39:53 -05:00 committed by GitHub
parent 790657a60f
commit fdf459a9f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,59 @@
# Computer Science Review Sheet
> ## Exam Layout
>> |Part|Description|Marks|
>> |:---|:----------|:----|
>> |```A```|**True / False**|10|
>> |```B```|**Multiple Choice**<br>- All java code learnt, selection, loops, methods, Arrays, methods, strings|38|
>> |```C```|**Short & Long Answers**<br>- Compare and contrast short code, methods, problem solving|20|
>> |```Total```||68|
## Intro To Programming
> ```Comments```: are used to explain and clarify program ocde for human reader
> |Operator|Uses|Description|
> |:-------|:---|:----------|
> |+|a + b|Addition|
> |-|a- b|Subtraction|
> |*|a * b|Multiplication|
> |/|a / b|Division|
> |%|a % b|Mod, the Remainder|
> **BEDMAS** rules still apply
> ## Strings
>> **```String:```** means a group of many characters
>> **```String Concatenation```**: means that two strings are combined into one using the "r" sign
> ## Varaibles
>> Holder for data
>> We can use words instead of just a single letter
>> - can store more than just numbers
>> a place in memory (RAM: random access memory) where it can be stored or referred to
>> - Name, type, value
>> To declare a variable
>> 1. Name
>> 2. Data Type
>> A variable is the name of a reserved memory location
>> A varaible name is called an identifier
>> Reserved words cannot be used as an identifier
> ## Java Primitives
> Variables can be created for any of the data types listed
> The chart shows examples of how to create a new variable for each primitive
> |Type|Range|Size|Variable|Declaration|
> |:---|:----|:---|:-------|:----------|
> |byte|-128 to 127|8 bits|bits_8|byte bits_8;|
> |short|-32768 to 32767|16 bits|TALL|short TALL;|
> |int|-2 billion to 2 billion|32-bits|sum|int sum;|
> |long|-9 quintillion to 9 quintillion(huge)|64 bits|mile|long mile;|
> |float|-3.4e<sup>+/-38</sup> to 3.4e<sup>+/-38</sup>|32 bits|pi|float pi;|
> |double|-1.7e<sup>+/-308</sup> to 1.7<sup>+/-308</sup>|64 bits|stuff|double stuff;|
> |char|Single (unicode) characters|16 bits|letter|char letter;|