Computer Science

Get Started. It's Free
or sign up with your email address
Rocket clouds
Computer Science by Mind Map: Computer Science

1. CS 1301

1.1. Chap 1

1.1.1. What are the various components of a computer (6 in total) CPU This is where all computation happens Memory Where temporary items are stored Storage Device Hard Drive - Is still there even if you shut down the computer Communication Devices Allows the computer to communicate with the outside world - USB Input Devices Allows information to be put in - Keyboard Out Put Devices Send out information - Monitor

1.1.2. What is Dot Pitch? Dot Pitch is the space between each pixle

1.1.3. What are the 3 different languages Machien Language Written in Binary Assembly Language In short commands such as ADD,R1,R2 High level Language English like language

1.1.4. What does a OS do? Operating Systems manage all the computer's activities.

1.1.5. What makes Java special It is machien indpendent and is in nearly every electronic device

1.1.6. What is Syntax and Semantic errors Syntax errors - errors that break the laws of coding such as forgetting a semicolon at the end of a statment Semantic errors - logical errors don't give the right result

1.1.7. What are the 3 main types of errors Compile Errors - a mistake that breaks the code like forgetting a semicolon Run Time Error - when you break the logic of a computer such as dividing by 0 Logical Error - wrong out put

1.1.8. What are the different types of JDK J2SE Java Standard Edition - client side program J2EE Java Enterprise Edition - server side  program J2ME Java Micro Edition - handheld

1.2. Chap 2

1.2.1. What makes variables unique? The program identifies an object by its name

1.2.2. What are the 8 primitive data type? Byte - Memory space Char - One Charater Short - 16 bits Smallest no decimal Int - 32 bits no decimal Long - 64 bits Largest no decimal Float - 32 bits decimal number Double - 64 bits decimal number Boolean - 16 bit yes or no

1.2.3. What is Widening conversions? When you widen a conversion you go from a smaller data type to a larger one such as short to int

1.2.4. What is Narrowing conversion? You narrow a conversion by going from a larger data type to a smaller one, often a loss of information will occur such as double to int.

1.2.5. What are the 3 main types of data type conversions? Promotion (temporary conversion) When a variable is temporarily converted for example multiplying a double with a int the int variable will be temporarily promoted to a double variable Assignment conversion When you assign one data type to another for example setting a double variable to the value of a int variable Casting Conversion (explicit conversion) When you tell Java explicitly to convert from one data type to another even if there is a loss of data

1.3. Chap 3

1.3.1. How does java read your programs Java reads all programs from top to bottom 1 statment at a time.

1.3.2. What are the three main kinds of statements? if Allows one statment if this is true do this if-else Allows two statments if this is true do this else do this switch Allows multiple statments after each case you need to put a break; in order for java to exit the statment if this is true to this and this until you have reached the end of the statement or have reached a break; point

1.3.3. What are the different boolean operators? == Equal too != Not equal too < less than > greater than <= less than or equal too >= greater that or equal too

1.3.4. What are the different logical operators ! Not && And | | Or ^ The two booleans should be different

1.4. Chap 4

1.5. Chap 5

1.6. Chap 6

1.6.1. What is a method? A method is a chunk of code you can call on to do certain tasks over and over again.

1.6.2. What is a methods signature A method's signature is its name and its paremeters.

1.6.3. What are the benefits of using a method? It promotes information hiding so that it is harder to find loopholes in your code. Also help organizing and keeping the code is a readable fashion.

1.6.4. What makes void methods special? They do not need to return any values

1.6.5. What is a runtime stack? A runtime stack is how the computer thinks and what it stores in its temporary memory. It will execute the main method and if it comes across another method inside of the main it will create some space for that method and then clear the space when it is not needed.

1.6.6. What are overloaded methods? These are methods that have two instances. Usually one with parameters and one without. One you run the method the computer will do its best to find out which method you wanted to invoke. But if it comes across a instances where it cannot decide which one you meant to run it will come back with an error.

1.6.7. What is an Ambiguous Invocation? An ambiguous invocation is where the java cannot decide which version of an overloaded method you mean to run. For example if you say: methodName(1,2); and you have one version with integers and one version of the method as doubles the program will fail and come back saying that it did not know which version of the method you wanted it to run.

1.6.8. What is a Scope of a Variable? The scope of a variable is how far is that variable known. For example when using a counter of i in a if statement that version of i only is their within that if statement. It cannot be referenced or re called at a point out side of that loop

1.7. Chap 7

1.7.1. What is an Array? An array is a collection of data values that are grouped toghether

1.7.2. What are some special characteristics about an array? A array can be changed through a method if run through. A array is only a bunch of pointers that point to its specified data value.

1.7.3. What are some array short cut commands? for (dataType value: arrayName){ System.out.print(value); }

1.7.4. How do you initialize an array? datatype[] arrayName = new datatype [numberOfElements in the array]

1.7.5. What is an anonymous array? An anonymous array is an array that does not have a name for example in this command : printArray(int[] {3,4,5,6});

1.7.6. What are the different ways the computer can search through an array? There are two ways, linear and binary. A LINEAR search method is by searching for through all data values in the array from first to last A BINARY search method is dome by taking the first last and middle of the array, sees which one its is closest to and then crosses out the ones it cant be. BINARY SEARCHES CAN ONLY BE DONE BY ARRAYS THAT ARE IN ORDER FROM LEAST TO GREATEST

1.8. Chap 8

1.8.1. What are multidimensional arrays? Multidimensional arrays are arrays that have arrays in side of arrays.

1.8.2. How do you initialize a multidimensional array? dataType[][] arrName = new dataType[1st dimension lentght][2nd dimension length];

1.8.3. How do you reference a certain element in an array? arryName [place in 1st dimension][place in 1st dimension1]

1.8.4. What are ragged arrays? 2 dimensional arrays that have different array lengths for each 2nd dimension.

1.9. Chap 9

1.9.1. What is an object? An object is datatype that is not a primitive datatype for example String is not a datatype

1.9.2. What is unique about an object? An object has an identity state and behaviors.

1.9.3. What is the state of an object? The state of an object is the set of data fields.

1.9.4. What is a class? It is a template for an object

1.9.5. What is the main method? The main method is the part of the program that is executed.

1.9.6. Why do we use private variables? We use private variables to hide information from the users and prevent them from changing them. It also makes it harder for hackers to find loopholes in your program.

2. CS 1302

2.1. Ch 11

2.1.1. Inheritance

2.1.2. Polymorphism Definition: A super type can reference a subtype A super type can refer to a subtype

2.2. Ch 13

2.2.1. Abstract Definition : An abstract class is a class that is declared abstract. Abstract class cannot be instantiated (cannot create a object from it). But they can have subclasses An abstract method is a method that is defined but not implemented in the class. The subclasses must implement these abstract methods or call them selves abstract classes. UML : Abstract is italizised Abstract method : is a method that is declared without an implementation (without braces, and followed by a semicolon) example : abstract void moveTo(double deltaX, double deltaY); If a class has a Abstract method the class must be declared Abstract * If the super class is abstract and has abstract methods, the subclass must implement all the abstract method from the super class If the subclass does not implement all abstract methods from the superclass. The subclass must be abstract Abstract can be used as a datatype

2.2.2. Interface An interface is a class that contains only abstract methods and constant variables. Interfaces cannot create instance of a object much like and abstract class Interface can be used as a datatype All data feilds and methods have a preset datatype All data fields are public static final All methods are public abstract

2.2.3. When to use a abstract vs interface class and how to use classes Abstract A "strong is a relationship" Interface A "weak relationship" Each class should be well defined and should handle one object at a time. For example when creating a list of people at a University, you may have a parent class of people and two subclasses, Student and Staff. These classes are well defined and hold only one object. A class should have a well definied responsiblity

2.3. Ch 14

2.3.1. FX Basic Structure Stage Scene This can be displayed as a UI

2.3.2. JavaFX JavaFX had replaced AWT and Swing, because it was better to create Internet application AWT(Abstract window tool kit)

2.3.3. GUI - Graphical User Interface

2.3.4. Binding Poperty Allows a target object to be bound to a source object If the source changed the target will change with it

2.4. Ch 15

2.4.1. Button When clicked java recognizes different button

2.4.2. Event Object This could be a button or something clicked on Event Handler These can handle events such as mouse clicks or a key being pressed and tells what java should do in certain situations Action Event

2.5. Ch 16

2.5.1. Nodes Labels

2.6. Ch 17

2.7. Ch 18

2.7.1. Recursion Essentially methods that call themselves Factorial is a good example from the power points of a method that calls itself Recursions must have a base case or they will never stop

2.7.2. H trees These kind of diagrams show complex pathways to a file

2.8. Ch19

2.8.1. Generics A generic class is a a class that can take more than one data type. An example of this is ArrayLists<> ArrayLists<> takes in multiple datatypes, although non of the datatypes are the primitive ones. Some major pros for generics are that any kind of errors that would occur with a incompatible object would occur during the build instead of run time which makes it easier to find the error

2.9. Ch 20

2.9.1. Data Structures Collection List Qeues Stack Priority Queue Set Iterators Maps