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

CSE205 Lecture 02

CSE205 Lecture 02

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

Javier Gonzalez-Sanchez PRO

September 12, 2021

Transcript

12 slides
  1. jgs CSE 205 Object-Oriented Programming and Data Structures Lecture 02:

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

    Day 2 1. What is a compiler? 2. What is Java byte code? 3. Give an example of a lexical error in Java 4. Give an example of a syntactic error in Java 5. Give an example of a semantic error in Java
  3. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 5 jgs

    Day 3 1. What is a variable? 2. What is a method? 3. What is a class? 4. Create a program that prints “This is my exam”. Including the code for creating a class and main method. 5. Write 3 reserved words in Java
  4. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 6 jgs

    Day 4 1. Write a multi-line comment with your name and ASUID 2. Mention the 8 primitive types defined in Java 3. Is the following statement, correct? char = ' ' '; 4. Is the following statement, correct? boolean result = 5 + 2 > 5 - 1 ; 5. What is the result of (-20 % 3 -2)
  5. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 7 jgs

    Day 5, 6 1. What is the result of 1 % 2 - 3 / 4 * 5 / 6 + 7 2. Is the following, correct? If so, What is the result? 1 % 2 - 3 / 4 * 5 / 6 + 7 + “Hello” 3. Is the following, correct? If so, What is the result? ”Hello” + 1 % 2 - 3 / 4 * 5 / 6 + 7 4. Is the following, correct? If so, What is the result? float f = 2.5f + 2.5f; System.out.println(f); 5. Is the following, correct? If so, What is the result? System.out.println( Math.pow(5.0,2.0) );
  6. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 9 jgs

    Day 7 1. What is a package? 2. What is the next instruction for? JOptionPane.showInputDialog(“this is a message”); 3. What is the next instruction for? Integer.parseInt(“12345”); 4. What is JOptionPane? 5. What is showInputDialog?
  7. jgs CSE 205 Object-Oriented Programming and Data Structures Javier Gonzalez-Sanchez,

    Ph.D. [email protected] 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.

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming