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

CSE110 Lecture 15

CSE110 Lecture 15

Principles of Programming with Java
Object-Oriented Programming
(202005)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez

June 08, 2017
Tweet

Transcript

  1. CSE110 Principles of Programming with Java Lecture 15: Object-Oriented Programming

    Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com Office Hours: By appointment
  2. Previously

  3. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 4 Problem

    • Create a program for Quizzes • Specifically to test your Arithmetic skills • For instance 75 + 31 = • Let us start with only additions and 2 digits numbers • Could the computer grade the Quiz? • Show the students her/his grade
  4. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 5

  5. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 6 class

    main()
  6. Level Up

  7. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 8 class

    Where we are? main()
  8. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 9 class

    What is next? main() class class class
  9. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 10 Everything

    is an object CSE470 Computer Graphics CSE412 Databases objects objects
  10. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 11 Object-Oriented

    Paradigm everything is an entity (object) A program is a collection of objects working together main()
  11. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 12 class

    Where we are? main() class create a new entity/object use the entity/object
  12. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 13 Object-Oriented

    Paradigm public class MyProgram { public static void main(String [] arg) { Student john = new Student(); john.name = "John Doe"; john.sayHello(); john.drawSomething(); } } public class Student { String name; int finalGrade; public void sayHello(){ // print name } public void drawSomething(){ // draw } }
  13. None
  14. None
  15. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 16 Reference

    Pages 362 - 367
  16. CSE110 - Principles of Programming Javier Gonzalez-Sanchez javiergs@asu.edu Summer 2020

    Disclaimer. These slides can only be used as study material for the class CSE110 at ASU. They cannot be distributed or used for another purpose.