Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE205 Lecture 04

CSE205 Lecture 04

Object-Oriented Programming and Data Structures
Programming with Java III
(202108)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez
PRO

September 14, 2021
Tweet

Transcript

  1. jgs CSE 205 Object-Oriented Programming and Data Structures Lecture 04:

    Programming with Java III Dr. Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 2 jgs

    Teaching Assistant § Graduate TA Aishwarya Namballa anamball@asu.edu
  3. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 3 jgs

    Homework § Quiz 02 (1hr quiz) to open Thursday. Multiple-choice and Open questions
  4. jgs Midterm Exam 2

  5. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 5 jgs

    Day 16 Classes and Objects Create the classes needed to make this line work: public class Exam{ public static void main (String []a) { Doctor doc = new Doctor(); Doctor.color = "white”; doc.name = "Dr. Who”; doc.age = 90; doc.writePrescription(); // This is your prescription doc.hello(); //print name, age, and color. Doctor.hi(); } }
  6. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 6 jgs

    Day 17 Methods Create the classes needed to make this line work: public class Exam{ public static void main (String []a) { Genius g = new Genius(); double x = g.areaOfCirleWithRadius(10); double x = g.areaOfTriangle(10,20); Genius.printFirst5FibonacciNumbers(); Genius.printFirst9FibonacciNumbers(); } }
  7. jgs Midterm Exam 3

  8. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 8 jgs

    Calendar
  9. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 9 jgs

    Lecture 30 Arrays of Objects John Mary Alice Robert 4 1 3 2
  10. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 10 jgs

    Lecture 27, 28, 29 Searching § Linear Search § Binary Search Sorting § Bubble Sort § Selection Sort
  11. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 11 jgs

    Lecture 30 Searching and Sorting Arrays of Objects John Mary Alice Robert 4 1 3 2
  12. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 12 jgs

    Lecture 31 2D Array § Declaration § Initializer List § Add values § Print values § Etc… 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2
  13. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 13 jgs

    Lecture 32 3D Arrays (Multidimensional) § Declaration § Initializer List § Add values § Print values § Etc… 12 24 8 16 4 8 9 18 6 12 3 6 6 12 4 8 2 4 3 6 2 4 1 2
  14. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 14 jgs

    Lecture 33 Recursion § How does it work § Understand factorial. Fibonacci, Searching, etc. § What about print numbers n to m? § What about add numbers 0 to n?
  15. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 15 jgs

    Questions
  16. jgs CSE 205 Object-Oriented Programming and Data Structures Javier Gonzalez-Sanchez,

    Ph.D. javiergs@asu.edu Fall 2021 Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University. They cannot be distributed or used for another purpose.