Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

CMSC131 Class Notes

Beoordeling
-
Verkocht
-
Pagina's
32
Geüpload op
28-02-2025
Geschreven in
2021/2022

Notes for the CMSC131 course taken at the University of Maryland, College Park

Instelling
Vak

Voorbeeld van de inhoud

Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string


Lecture 1 and 2:
● IDE = Integrated Development Environment

Lecture 3: Number Base Conversions
● Base to 10 : basen, basen-1, … , base1, base0
● 10 to base: number/base → remainder is rightmost digit → repeat
● Binary to hex < -- >: group by four and use 8421
○ A=10 → → → F=15
● Write numbers as: numberbase

Lecture 4: Hardware Basics
● Hardware: physical components
● Software: programs
● CPU = Central processing Unit
● Ram:
○ primary memory
○ Random Access Memory
○ extremely fast
● Secondary memory:
○ More permanent (non-volatile)
○ More storage
○ Hard drive
○ USB
● I/O devices: from perspective of computer:
○ Input = send data to computer (mouse)
○ Output = send data from computer (printer)
● Bit: binary digit, either 0 or 1
● Byte: “a sequence of 8 bits”
● Byte combinations available given k(bits) : 2k
● Kilobyte = 1000 or 210
● Megabyte = 1 million or 220
● Gigabyte = 1 billion or 230
● Terabyte = 1 trillion or 240
● How to represent data in binary
○ negative numbers:
■ 2’s complement
■ Flip binary digit and add 1
● -27
● Flip 11011→ 00100
● Add one 00100 + 1 = 00101

,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string




○ Floating point:
■ Write in scientific notation → _.__ e k
■ Write number in binary and attach k in binary to the end
● *Not correct* 247.3721 → 2.373721e2
● 1101101110110110111 x 27
● 1101101110110110111 |7 represented in binary|
● 1101101110110110111 |0111|
○ Text:
■ Each character has a specific number attached to it
■ ASCII used to be original system
● Used one byte
● 256 possibilities
● 8 digits used
■ unicode
● Since we have more characters to use (diff languages)
● 2 bytes
● 16 digits used

Lecture 5: Operating Systems
● There is windows mac, android, iOS
● What do operating Systems do:
○ Process management
■ What is running right then
■ Could be virus protection or apps not open
■ Orders them in importance
○ Memory Management
■ What memory is being used or not
○ Primitive I/O
■ Handling devices like printers and mouse
○ GUI
■ Graphics, windows, dragging
○ Network control
■ Manages data packets
■ Sent or failed
○ Security
■ Accounts and encryptions

,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string


Lecture 6: Programming Languages
● Machine language: language that CPU uses
● Assembly language: mnemonic representation of machine language, “readable”
● Languages:
○ Fortran
■ Late 50’s
■ One of the first programming languages
■ Used by scientists and engineers
■ Not designed for object oriented
○ Cobol:
■ Late 50’s
■ Used with big corporations, business
■ Not designed for object oriented
○ Lisp:
■ Hasn’t changed much
■ Used in AI
■ Still used
○ Pascal
■ Used in education
○ C
■ Very easy to learn
■ Not too different from assembly code
■ Procedurally oriented
○ C++
■ Changed for object oriented, abomination
○ Python
○ Java
■ Object oriented
○ Ruby
■ Language of least astonishment
○ Translating higher level code to machine code
■ Compiler is faster but platform dependent
■ Interpreter is the same for everyone
■ Java is both
■ Java compiles to universal java bytecode program and then invokes
interpreter
■ Portability: bytecode runs on all different platforms the same way for
everybody


Lecture 7: First Java Programs

, Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string


● Object: occupy memory and can do things
● Class: module that you write, type of object
● Method: chunk of code given a name
○ Main method: program starts
● Statements: sequential
○ End in “ ; ”
● Comments:
○ // to end of line
○ /* multiple lines */
● String literals: text with “”
● Console: shows running code
● Variables:
○ Variable declaration= making a variable
■ Must do first to be able to use
○ Memory diagram
■ Call stack with value
○ = is assignment operator
■ Name of variable = value

Lecture 8: Primitive Types
● Whole Number primitive types
○ Int = 4 bytes
■ int secondsPerYear = 31557600
○ Long = 8 bytes
■ long humansOnEarth = 7,625,913,792L
○ Short = 2 bytes
○ Byte = 1 bytes
■ byte age =19
● Floating Point primitive types
○ float = 4 bytes
■ float distance = 52.25F
○ double =8 bytes
■ More precision
■ Good for NASA
■ double velocity = 325.92732

● Remaining primitive types
○ char = store characters
■ char letterGrade = 'A';
○ Boolean
■ boolean result = true;

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
28 februari 2025
Aantal pagina's
32
Geschreven in
2021/2022
Type
College aantekeningen
Docent(en)
Fawzi
Bevat
Alle colleges

Onderwerpen

€3,56
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
martinsokorie

Maak kennis met de verkoper

Seller avatar
martinsokorie University Of Maryland - College Park
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
3
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen