Home | This week's review ticket | Replit code | team repository | Tech Talks |
Sorting Algorithms |
Lecture Notes |
---|
Unit2 | Unit1 |
Unit2
Objected Oriented Programming
- original computers couldn’t understand modern programming language
- used machine language, not meant for humans to understand, meant to tell computer what to do
- programming languages are made for humans
- first programming language was assembly language, example below
-
example code breakdown: d=255; for(int i =0; i<d; i++){d–;}
-
assembler takes assembly language and converts it to machine language
Ex:
- expression from assembly language corresponds to a symbol in machine language, easy conversion
- assembly language referred to as low level programming language, because close to computer
- people wanted languages further away from computer, deals with ideas humans more familiar with
- Fortran example:
-
self explanatory code
- programming language designed with a purpose
- general purpose language used to solve wide variety of problems
- other program languages designed to solve specific problems
- Fortran originally designed to help people in math and science
- commonly used by astronomers
- COBOL used for data processing, Ex:
- used in business, specific purpose
- many languages because many ways to solve a problem
- another reason is that people seek to improve programming languages
- ex: java, came from c++
- another reason is that people seek to improve programming languages
- object oriented programming
- like using a cellphone
- don’t know how cellphone works, but know how to use cellphone
- don’t need to know how it works
- like using a microwave
- don’t know specifics of microwave
- just know how to use it
- like using a cellphone
- programmers realized we live object oriented
- don’t know the specifics, but know how to use stuff
- objected oriented programming requires classes to create objects
- java example with cellphone:
- just need to pass in required data to object in order to use
- object oriented programming useful in collaboration
- allows concurrent development
Unit1
Primitive Data Types in Java
- In Java, there are 8 primitive data types
- First will focus on the difference between doubles and integers
- Trying to store the values added together in sum as an int would result in an error because data can be lost in that calculation.
- Take in information, manipulate it, and output new information (point of code)
- Strings are NOT primitive data types