Verified Documents at University of British Columbia - Okanagan

Browse the full collection of course materials, past exams, study guides and class notes for COSC 111 - Computer Programming I at University of British Columbia - Okanagan …
PROFESSORS
All Professors
All semesters
Abdallah Mohamed
fall
22
winter
2

Verified Documents for Abdallah Mohamed

Class Notes

Taken by our most diligent verified note takers in class covering the entire semester.
COSC 111 Lecture Notes - Lecture 4: Cosc, Reserved Word, Elementary
= a lo(cid:272)atio(cid:374) i(cid:374) the (cid:272)o(cid:373)pute(cid:396)"s (cid:373)e(cid:373)o(cid:396)y to sto(cid:396)e data i(cid:374) p(cid:39
3132
COSC 111 Lecture 5: Arithmetic Operations, Conversions, and Math Operations
387
COSC 111 Lecture Notes - Lecture 6: Duit
465
COSC 111 Lecture 7: Lecture_7_Character_Types_and_Operations
372
COSC 111 Lecture Notes - Lecture 8: Divisor
Converting strings and numbers using parse method chapter 4. String s1= "5", s2 = "1. 4"; int n = integer. parseint(s1); //this converts string "5" int
290
COSC 111 Lecture Notes - Lecture 9: Triangle
If-else statements public static void main(string[] args) { }} system. out. println("yes, my number is " + target); }} Scanner in = new scanner(system.
262
COSC 111 Lecture 10: Loops (Part 1)
366
COSC 111 Lecture 11: Lecture_11_Midterm_1_Review (1)
452
COSC 111 Lecture Notes - Lecture 13: Method Stub
563
COSC 111 Lecture Notes - Lecture 14: Method Stub
258
COSC 111 Lecture Notes - Lecture 15: Local Variable, Linear Regression
If public static int incr(int a){}, then must return int; If public static void incr(int a){}, doesn"t return a value; = if invoke method with argument
472
COSC 111 Lecture Notes - Lecture 15: Boeing 737 Max, Method Stub, Array Data Structure
Declaring, creating, and initializing arrays int [] x; x = new int[3]; x[0] = 1; x[1] = 4; x[2] = 2; Declare: x is the name of the array with value nul
461
COSC 111 Lecture Notes - Lecture 16: Method Stub
--------------------------------------------- arrays and methods ---------------------------------------------- elem++; x[i]++; public static void main
354
COSC 111 Lecture Notes - Lecture 16: Array Data Structure, Boeing 737 Max, Method Stub
Declaring, creating, and initializing arrays int [] x; x = new int[3]; x[0] = 1; x[1] = 4; x[2] = 2; Declare: x is the name of the array with value nul
667
COSC 111 Lecture Notes - Lecture 18: Foreach Loop
Anonymous arrays two-dimensional arrays njh int sum = 0; for(int elem: a) return sum; sum += elem; public static int sum (int a) { public static void m
592
COSC 111 Lecture 18: Lecture_18_Two_D_Arrays
Anonymous arrays one-dimensional arrays njh int sum = 0; for(int elem: a) return sum; sum += elem; public static int sum (int a) { public static void m
6118
COSC 111 Lecture 19: Classes and Objects
[classes and objects: blueprint, attributes = what the object is, behavior (actions) = what the object can do, construction. --------------------------
354
COSC 111 Lecture Notes - Lecture 20: Type Signature
= lectures 9 (october 2nd , 2018) - 16 (october 25th, 2018) = chapters 5: loops 7: single-dimensional arrays. While loop (w/ break) int sum = 0; int nu
683
COSC 111 Lecture Notes - Lecture 22: Default Constructor
279
COSC 111 Lecture 23: OOP Recap
379
COSC 111 Lecture Notes - Lecture 24: Mutator Method
Three pillars of oop: data field encapsulation. = set data fields private to protect value (i. e. prevent invalid value inputted) Getter method (a. k.
482
COSC 111 Lecture Notes - Lecture 25: Reference Class Problem, Instance Variable, Local Variable
Polymorphism (this will not be discussed in this course) This = reference than an object can use to refer to itself. A class member can be referenced f
3112