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)

Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

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

    Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com Office Hours: By appointment
  2. 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
  3. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 9 class

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

    is an object CSE470 Computer Graphics CSE412 Databases objects objects
  5. 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()
  6. Javier Gonzalez-Sanchez | CSE110 | Summer 2020 | 12 class

    Where we are? main() class create a new entity/object use the entity/object
  7. 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 } }
  8. CSE110 - Principles of Programming Javier Gonzalez-Sanchez [email protected] 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.