Pace University. Fundamental Concepts of CS121 1

Save this PDF as:
Size: px
Start display at page:

Download "Pace University. Fundamental Concepts of CS121 1"

Transcription

1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction to Java Programming. It serves as a review outline. All questions in quizzes and exams will be based on concepts listed in this document. Most of the skills that you need for writing Java programs are also listed in this document. Make sure that you can answer all the questions or understand the listed concepts for each section that we have covered. Copyright Dr. Lixin Tao, Pace University, This document should not be copied partially or in full, or published in any form, without the permission of the author.

2 1 Computer Systems and Programming Languages 1.1 Problem vs. problem instances 1. What are the differences between a problem and a problem instance for the problem? 2. Is a computer program supposed to solve a problem or a problem instance? 3. What is the function of a computer program in problem-solving? 4. What do we mean when we say that a program is correct? 5. What do we mean when we say that a program is robust? 1.2 Structure of a personal computer 1. What is a machine language program? 2. What are the relationship among computer hardware, software, and data? 3. What are the functions of CPU, main memory, hard disk, keyboard, and display? 4. Can data in CPU and main memory survive power failure? 5. Can data in hard disk survive power failure? 6. How many devices can send data through the system bus simultaneously? 7. How many devices can receive data through the system bus simultaneously? 8. Why we need the main memory, instead of letting CPU run programs on the hard disk directly? 1.3 CPU 1. Which computer device defines and implements the machine language of a computer architecture? 2. What is the function of the program counter? 3. What is the function of general-purpose registers in a CPU? 4. Which are the major phases for the CPU to execute a machine instruction? 5. How are activities of a CPU synchronized? 1.4 Memory 1. For a computer, what is a bit, a byte, or a word? 2. How is the main memory organized? 3. What is memory address? 4. What is the smallest memory address? 5. What is memory value corresponding to a memory address? 6. When a value is written into a memory cell, what happens to the original value in that cell? 7. When a value is read out of a memory cell, is the current value in the memory cell modified? 8. The main memory is used to store programs or data? 9. Even though memory hardware can only store binary bits, how can a memory store different types of data like integers, floating-point numbers, strings, and programs? 1

3 1.5 Disk file system 1. What is the basic unit for storing programs or data on a hard disk? 2. What components a file name may contain? 3. What is the function of a file name extension? 4. What is a file system directory? 5. Can a directory contain another directory? 6. Should we use short and encrypt file names, or concise file names that convey the purpose of the files? 7. What is a file system directory tree? 8. What is the working directory for a Command Prompt window? 9. What is the absolute path of a file? 10. What is the relative path of a file? 11. Which directory does period (.) represent? 12. Which directory do double periods (..) represent? 1.6 Display 1. What is the main function of a computer display? 2. What is a pixel? 3. What is the resolution of a display? 4. What are the text mode and graphics mode of a display? 5. In the text mode of a display, what is the function of a display cursor? 6. Which key strike will cause the display cursor to terminate the current line and move to the beginning of the following line? 7. In the graphics mode of a display, what kind of coordinate system is used to define the position of a pixel? 1.7 Keyboard 1. What is the function of a keyboard? 2. What is an active window? 3. Which keys can generate white space characters? 1.8 Computer Software 1. What is computer software? 2. What are the two major types of software? Give examples. 3. Can you list the names of three high-level programming languages? 1.9 Java programming language 1. What is a Java keyword or reserved word? 2. Why we need high-level programming languages? 3. What is source code? 4. What is executable code? 5. What is a bytecode file? 6. What is a class file? 7. What is an interpreted programming language? 2

4 8. What is a compiled programming language? 9. How is Java program source code translated into machine instructions to be executed by a CPU? 10. What is Java virtual machine? 11. What is the name of the command for compiling Java source files into bytecode files? 12. What is the name of the command for executing the Java bytecode files? 13. Is a Java bytecode file hardware or operating system dependent? 14. Java was launched by which company and in which year? 15. What is the syntax structure of an identifier? 16. What is good practice for identifiers so Java program maintenance can be easier? 17. What are Java reserved words or keywords? 18. Does a Java class s name capitalize its first letter? 19. Does a Java method s name capitalize its first letter? 20. Does a Java variable s name capitalize its first letter? 2 Software Installation 1. What is J2SE (Java 2 Standard Edition) for? 2. What is J2SE SDK (Software Development Kit), also called JDK, for? 3. What is J2SE JRE (Java Runtime Environment) for? 4. What is the current version of J2SE? 5. What is the base URL for downloading Sun J2SE SDK? 6. Does the installation of J2SE SDK also install J2SE JRE as part of it? 7. Where are commands javac.exe and java.exe located in a J2SE SDK installation? 8. What is the composition and function of environment variable PATH? 9. What is the composition and function of environment variable CLASSPATH? 10. How to temporarily change the value of CLASSPATH in a Command Prompt window? 11. If we don t set any value for CLASSPATH, what is CLASSPATH s default value? 12. How to start a Command Prompt window? 13. Inside a Command Prompt window, how to change the working directory, how to compile and run a Java program? 3 Java Basics 3.1 Basic Hello World program 1. How to write the basic Hello World program (as simple as possible, but it can compile and run)? 2. Are public, class, static, and void Java s reserved words? 3. Are Java programs case-sensitive? 4. What file name should be used for holding the declaration of a public class named Welcome? 5. Can a Java source code file contain more than one public class? 6. To print a message to the display and then move the display cursor to the beginning of the following line, use System.out.println("MessageToBeDisplayed"); 7. Each statement must terminate with semicolon (;). 3

5 8. A Java program contains one or more classes, and a class contains one or more methods. 9. The body of a class or a method is enclosed in a pair of curly braces. 10. Java character string constants (literals) are enclosed in straight double quotes, as "Hello world". 11. When a Java program is run, its method main() is the first method to be called and executed. Method main() must read as public static void main(string[] args) { }. 3.2 Code style and command-line arguments 1. On any source code line, // signifies the beginning of a Java comment, and the comment ends at the end of the line. A comment will be replaced by the compiler with a white space character. 2. It is important to add proper comments inside a source file so people can understand the program s logic. Comment is an important form of software documentation. 3. Space, Tab, and Enter keys generate white space characters, and in a Java source code file, a single white space is equivalent to any number of white space characters. 4. How source code should be indented for supporting a good source code style? 5. What are the two main styles of writing Java source code as to the position of the opening curly braces? 6. Should we use a mixture of the two source code styles in the same project? 7. What are command-line arguments of a Java program? 8. How to access the command-line arguments inside method main()? 9. How to print a message and then leave the display cursor to the right of the last character printed? 10. How can operator + concatenate a few strings into a single one? 3.3 Java package 1. What are Java packages for? 2. Can a Java package contain another package? 3. How to declare that a class belongs to a particular package? 4. Where must the package declaration be in a source code file? 5. Does a package declaration need a semicolon to terminate it? 6. How is Java package implemented in a file system? 7. If a class belongs to package cs121, in which directory that the bytecode file for the class must be kept? 8. What is the most convenient way to compile a Java class into a specified class base directory and generate the necessary directories for the corresponding packages on the package path for the class automatically? 9. How to run a class that belongs to a package? 3.4 Best practice for organizing multiple class projects 1. What is the best practice for organizing multiple class projects? 2. Where should we save the source files for classes belonging to some Java packages? 3. What is the advantage of separating Java source code from the bytecode files? 4. How should we set up CLASSPATH value so that we can run the projects from any working directory? 4

6 5. In which working directory should we compile a project? 6. Do we need to compile explicitly each Java class source code file in a multiple-class project? 7. How can we compile a project so that the bytecode files are stored in the same directories as their corresponding Java source files? 8. Can the class-level variables of a class be accessed by all methods of the class? 9. If a class-level variable has no value initialization during declaration, what will be its default value? 10. If a variable has value null, what is the meaning? 11. How can we access a public and static variable of a class? 12. What is the meaning for a method to invoke another method? 3.5 Local variables, expressions, and assignment 1. Where can local variables be declared? 2. The local variables will be accessible in which scope? 3. Why a variable needs to be declared to have a fixed data type? 4. What do people mean when they say that Java is a strongly-typed language? 5. Will the value stored in a variable be modified if we read the variable s value out? 6. Will the value stored in a variable be modified if we store a new value into the variable? 7. If a local variable is declared with no initial value, is the variable going to have a default initial value? 8. How to declare local variables with initial values? 9. How to declare multiple local variables of the same type in the same Java declaration? 10. Can we declare the type of a variable more than once in the same method? 11. Can we read the value of a variable before it is declared? 12. Can we read the value of a variable before it is initialized? 13. What is the difference between the = operator in a Java assignment from the mathematical relational operator =? 14. How is an assignment statement executed? 15. Can the left side of operator = in an assignment statement be anything other than a variable? 16. What is the meaning for a variable to appear to the right side of operator = in an assignment statement? 17. Assume x = 1. What is the value of variable x after the execution of expression ++x? 18. Assume x = 1. What is the value of expression ++x? 19. Assume x = 1. What is the value of variable x after the execution of expression x++? 20. Assume x = 1. What is the value of expression x++? 21. What is the result of applying operator + to a string value and an integer value, like "CS" + 121? 22. What kind of expressions has side effects? 3.6 Basic built-in data types and type casting 1. List four popular Java built-in data types. 2. Do Java data types have fixed lengths on all hardware and operating system platforms? 3. How many bits are used to store a Java int value? 4. How many bits are used to store a Java double value? 5. How many bits are used to store a Java char value? 5

7 6. What is the data type for literal 12? 7. What is the data type for literal 12.0? 8. What is the value of 7/2? 9. What is the value of 7.0/2? 10. What is 5 % 2? 11. What is type promotion? 12. How can we change the operator evaluation order in an arithmetic expression? 13. Literal values of type char must be enclosed in what kind of delimiters? 14. What is implicit data type casting? 15. Can we assign a double value into an int type variable? 16. What is explicit data type casting? 17. When do we need to use explicit data type casting? 18. What are the valid values of a boolean type variable? 19. Is a relational expression also a boolean expression? 20. What is the value of (1 >= 1)? 21. What are the three most important Boolean operators? 22. When will the conjunction of two Boolean expressions be true? 23. What is the value of ((i < 5) && (i >= 5))? 24. When will the disjunction of two Boolean expressions be false? 25. What is the value of ((i < 5) (i >= 5))? 26. How to convert a string-form int value into an int value? 27. How to convert a string-form double value into a double value? 28. How to convert a string-form boolean value into a boolean value? 29. How to retrieve the second character of a string? 30. How to convert a lower-case letter into its upper-case counterpart? 31. What are the values of the following method invocations against class Math? a. abs(-2) b. ceil(1.5) c. floor(1.5) d. exp(0.0) e. log(1) f. max(1, 2) g. min(1.0, 2.0) h. pow(2.0, 3.0) i. sqrt(4.0) j. random() 3.7 Command-line arguments and loops 1. How to specify a command-line value that contains space characters? 2. Assume the method main() has parameter args. Which command-line argument will be stored in args[0]? 3. If there is no command-line arguments used for a run, what is the value of expression args.length? 4. Which Java library class can be used to sort an array of numbers or strings? 5. What is a compound statement? 6. Can a compound statement contain local variable declarations? Where? 7. Is the body of a method a compound statement? 6

8 8. Is the body of a class a compound statement? 9. Can we replace any statement in a program with a compound statement without violating the syntax specification for Java? 10. If we declare a local variable inside a compound statement, can we access that variable outside of the compound statement? 11. When will a while loop terminate? 12. Can the body of a while loop be a single statement? 13. Enumerate the steps for a while loop to be executed. 14. What is a loop iteration? 15. What is a loop variable? 16. Where should the loop variable for a while loop be declared and initialized? 17. What will happen if we don t modify the value of the loop variable for a while loop during its iteration? 18. What is the control block of a for loop? 19. What is the function of each of the three components of the control block of a for loop? 20. Which character should be used to separate the three components of the control block of a for loop? 21. If we declare the loop variable in a for loop s control block, can we access this loop variable outside the loop body? 22. Enumerate the steps for a for loop to be executed. 23. Normally where do we declare a loop variable and initialize it for a for loop? 24. If a program runs into an infinite loop for some special input data, can the program still be a correct program? 25. What is lexicographic order for character strings? 3.8 Calculator with if-else statements 1. How to find the length of a one-dimensional array? 2. What is \n for in a string literal? 3. What is \t for in a string literal? 4. How is an if statement executed? 5. Is the pair of parentheses for the Boolean expression of an if statement optional? 6. How to chain a list of several if statements together? 7. What is System.exit(int); for? 8. What is the meaning of values for variable x in System.exit(x);? 9. When must we use System.exit(int);? 10. When can we use * as a command-line argument? 3.9 Calculator with switch statement 1. Variables of which data types can be used for the switch expression of a switch statement? 2. Can we omit the pair of parentheses around the switch expression? 3. Do we need a semicolon at the end of a compound statement? 4. Can the case values of the case labels be of different data types from that of the switch expression? 5. Can multiple case labels have the same case value? 7

9 6. Is the default case mandatory? 7. Is the order of the cases important? 8. Can a statement have multiple case labels in a switch statement? 9. What is the meaning of a break statement in a switch statement? 10. How is a switch statement executed? 11. What will happen if the statements for a switch case is not terminated with a break statement or a System.exit(int); statement? 3.10 Calculator with exception processing 1. What is a Java exception? 2. Give two examples that Java code will throw exception objects? 3. If a method receives an exception object not caught by a try-catch block, what will happen? 4. What is a try-catch block for? 5. Is the try clause of a try-catch block optional? 6. Are the catch clauses of a try-catch block optional? 7. Is the finally clause of a try-catch block optional? 8. What statements should be put in the try clause? 9. What is the parameter of a catch clause for? 10. When will a catch clause be executed? 11. When will a finally clause be executed? 12. What kind of exceptions will be caught by catch (Exception e) { }? 13. How does a try-catch block work? 14. What will happen if an exception is thrown to method main() and it is not caught by a catch clause? 15. What is the difference between Java comments delimited by // and those delimited by /* and */? 16. What will happen if // form of comments are embedded inside a pair of /* and */? 3.11 Conditionally interrupting loops 1. If a loop executes statement break, what will happen? 2. If a loop executes statement continue, what will happen? 3.12 Arrays 1. How to declare 1000 int-type variables on one Java source code line? 2. How to declare that variable x is of type array of ints? 3. How many bits will be used to implement an array variable? 4. Does the declaration of an array variable also allocate space for the array? 5. How to allocate an array for 10 integers and connect this array with an int array variable x? 6. If an array has length 10, what are its valid index values? 7. What is the easiest way to declare y to be an int array variable and connect it with an int array of length 1 containing value 1? 8

10 8. How to declare a 2-D int array variable with name z? 9. How to allocate space for a 4 x 4 square int array and connect it with variable z? 10. To access the cell at row 2 and column 3 of array z, should we use expression z[2][3], or z[3][2], or z[2, 3]? 11. How to declare that z3 is a 3-D int array variable? 12. How to allocate space for a 4 x 5 x 6 int array and connect it with a 3-D int array variable z3? 13. To access the cell on plane 1, row 2 and column 3, should we use expression z3[1][2][3], or z3[3][2][1], or z3[1, 2, 3]? 3.13 Method declaration and invocation 1. What are Java methods for? 2. What is a method s signature? 3. Are parameter names parts of a method s signature? 4. What is method return type? 5. What do we mean if we say that a method has void as its return type? 6. What is method parameter list? 7. What is a method declaration? 8. What is a method invocation? 9. What is a method s body? 10. If a method has no parameters, do we still need the pair of parentheses for the parameter list? 11. If a method has two parameters x and y both of type int, can we declare them as in (int x, y)? 12. Can we declare local variables inside a method declaration? Where? 13. Can we declare the type of a variable more than once in the same method? 14. What are the differences between method parameters and method arguments? 15. How are the values of method arguments passed to method parameters? 16. Can a method invocation contain different number of arguments that the number parameters in that method s declaration? 17. How is a method invocation executed? 18. Are parameters of a method part of the local variables of the method? 19. Where can the method parameters be accessed? 20. If a method contains only one statement, can we omit the enclosing curly braces for the method body? 21. Should we capitalize the initial letter of a method s name? 22. What character is used to separate the successive parameters declarations in a method s parameter list? 23. How can we change the name of a parameter without changing the containing method s signature or function? 24. If a method s body executes statement return;, what will happen? 25. If a method s body executes statement return 2*2;, what will happen? 26. If method a() calls method b(), which in turn calls method c(), what is the order for the three methods to complete their executions? 27. Is the order of method declarations in a class important? 28. Can a static method s body invoke a non-static method? 29. What is the value of expression (1 > 2? 1 : 2)? 9

11 3.14 Java documentation comments 1. How to write a Java doc comment? 2. What are Java doc comments for? 3. Where should Java doc comments be located? 4. What is the general structure of a Java doc comment? 5. Which tag should be used to specify a parameter in a Java doc comment? 6. Which tag should be used to specify the method return value in a Java doc comment? 7. How to generate Java documentation HTML files for all the Java source code files in the current working directory? 8. Which generated file is the root file for the resulting HTML documentation? 9. How to let the Java documentation list both public and private methods? 3.15 Scopes of local variables 1. Where can the method parameters be accessed? 2. What is the scope of a local variable? 3. Can a local variable declared in a compound statement be accessed from a nested compound statement after this declaration? 4. If a loop variable is declared in the control block of a for statement, can we access that variable outside of the for loop? 3.16 Formatting output 1. What is the purpose of method System.out.printf()? 2. What is the first parameter of System.out.printf() for? 3. What does %4.2f stand for as part of the first argument to System.out.printf()? 4. What does %6d stand for as part of the first argument to System.out.printf()? 5. If the first argument of System.out.printf() contains 3 substrings of form similar to %4.2f or %6d, how many total arguments must be used in this method invocation? 6. What is the major difference between a variable of type int and a variable of type Random? 7. How can we generate random integers between 0 and 9 inclusive? 8. How can we generate random double values between 0.0 (inclusive) and 10.0 (exclusive)? 9. What is the meaning of importing a class? 10. How to declare that a class needs to import a particular class from a particular package? 3.17 Timing the evaluation of π 1. Can Java double typed variables store all accurate floating-point numbers? 10

12 2. What may happen if a loop is controlled by a Boolean expression that checks whether a double variable has a particular value? 3. What value will be returned by an invocation to method System.currentTimeMillis()? 4. How many bits are used to store a Java long typed variable? 3.18 Matrix multiplication 1. What is the function of method setseed(int) of class Random? 2. How to check the number columns that a two-dimensional array a[][] has? 3. How to avoid repeating similar code in a program? 3.19 Interactive command-line data input 1. How to use class java.util.scanner to get the next integer from a Command Prompt window? 2. How to use class java.util.scanner to get the next double value from a Command Prompt window? 3. How to use class java.util.scanner to get the next line from a Command Prompt window? 4. What should we do before we wait for some user input from a Command Prompt window? 3.20 Window-based data input/output 1. How to pop up a window and request the user to input a string? 2. How to pop up a window to print out some message? 3. When should we use System.exit(int) to terminate a program s execution? 3.21 Text file input/output 1. How to open a text file for reading its contents line by line? 2. How to open a text file for writing text data into it with methods print(), println(), or printf()? 3. How to check whether a file is in existence already? 4. How to close a file? 5. Why do we need to close a file? 6. When should we use a clause like throws IOException for a method? 7. How to remove the leading and trailing white space characters in a string? 8. How to parse a string into white-space-separated tokens (strings that don t contain white space characters)? 9. How to import all classes in a package? 10. What type of exception that the file manipulation methods may throw? 3.22 Recursive vs. iterative methods: factorial 11

13 1. What kind of methods are iterative methods? 2. What kind of methods are recursive methods? 3. What is an activation record for a method s invocation? 4. Can we have multiple unfinished invocations to the same method? 5. Are the local variables of a method shared by multiple unfinished invocations to the method? 6. What will happen if a method executes statement throw new Exception( reason for this exception )? 7. When should we use recursive solutions? 8. When should we use iterative solutions? 3.23 Recursive vs. iterative methods: Fibonacci numbers 1. Why the recursive solution for Fibonacci numbers is much slower than that based on a loop? 2. Which version of the solution is easier to write and read? 3.24 Algorithm and Towers of Hanoi 1. What is an algorithm? 2. Does an algorithm have to stop for any valid input data? 3. What is the time complexity of an algorithm? 4. What is the space complexity of an algorithm? 5. What is the Towers of Hanoi problem? 3.25 Bubble sort 1. What do we mean for sorting an array of integers? 2. What is the main idea of bubble sort? 3. What is the function of the outside loop of the bubble sort method? 4. What is the function of the inner loop of the bubble sort method? 5. The running time of the bubble sort method will be proportional to what expression of the input size? 3.26 Binary search 1. What is a data record? 2. What is the key field of a data record? 3. Can different data records have the same value for their key field? 4. What is the data search problem? 5. How does sequential search work? 6. What are the best-case and worst-case time complexities of sequential search? 7. How does binary search work? 8. What are the best-case and worst-case time complexities of binary search? 12

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

Index COPYRIGHTED MATERIAL

Index COPYRIGHTED MATERIAL Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes

More information

Program Fundamentals

Program Fundamentals Program Fundamentals /* HelloWorld.java * The classic Hello, world! program */ class HelloWorld { public static void main (String[ ] args) { System.out.println( Hello, world! ); } } /* HelloWorld.java

More information

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic BIT 3383 Java Programming Sem 1 Session 2011/12 Chapter 2 JAVA basic Objective: After this lesson, you should be able to: declare, initialize and use variables according to Java programming language guidelines

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Java application A computer program that executes when you use the java command to launch the Java Virtual Machine

More information

Java+- Language Reference Manual

Java+- Language Reference Manual Fall 2016 COMS4115 Programming Languages & Translators Java+- Language Reference Manual Authors Ashley Daguanno (ad3079) - Manager Anna Wen (aw2802) - Tester Tin Nilar Hlaing (th2520) - Systems Architect

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

Java Overview An introduction to the Java Programming Language

Java Overview An introduction to the Java Programming Language Java Overview An introduction to the Java Programming Language Produced by: Eamonn de Leastar (edeleastar@wit.ie) Dr. Siobhan Drohan (sdrohan@wit.ie) Department of Computing and Mathematics http://www.wit.ie/

More information

Key Differences Between Python and Java

Key Differences Between Python and Java Python Python supports many (but not all) aspects of object-oriented programming; but it is possible to write a Python program without making any use of OO concepts. Python is designed to be used interpretively.

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object oriented programming. Instructor: Masoud Asghari Web page:   Ch: 3 Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning

More information

Software Installation for CS121

Software Installation for CS121 Software Installation for CS121 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University August 26, 2005 1 Installation of Java J2SE 5 SDK 1. Visit Start Settings Control Panel

More information

An overview of Java, Data types and variables

An overview of Java, Data types and variables An overview of Java, Data types and variables Lecture 2 from (UNIT IV) Prepared by Mrs. K.M. Sanghavi 1 2 Hello World // HelloWorld.java: Hello World program import java.lang.*; class HelloWorld { public

More information

Exam 1 Prep. Dr. Demetrios Glinos University of Central Florida. COP3330 Object Oriented Programming

Exam 1 Prep. Dr. Demetrios Glinos University of Central Florida. COP3330 Object Oriented Programming Exam 1 Prep Dr. Demetrios Glinos University of Central Florida COP3330 Object Oriented Programming Progress Exam 1 is a Timed Webcourses Quiz You can find it from the "Assignments" link on Webcourses choose

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

More information

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths

More information

The Warhol Language Reference Manual

The Warhol Language Reference Manual The Warhol Language Reference Manual Martina Atabong maa2247 Charvinia Neblett cdn2118 Samuel Nnodim son2105 Catherine Wes ciw2109 Sarina Xie sx2166 Introduction Warhol is a functional and imperative programming

More information

Java Bytecode (binary file)

Java Bytecode (binary file) Java is Compiled Unlike Python, which is an interpreted langauge, Java code is compiled. In Java, a compiler reads in a Java source file (the code that we write), and it translates that code into bytecode.

More information

Lecture Set 2: Starting Java

Lecture Set 2: Starting Java Lecture Set 2: Starting Java 1. Java Concepts 2. Java Programming Basics 3. User output 4. Variables and types 5. Expressions 6. User input 7. Uninitialized Variables 0 This Course: Intro to Procedural

More information

CS 231 Data Structures and Algorithms, Fall 2016

CS 231 Data Structures and Algorithms, Fall 2016 CS 231 Data Structures and Algorithms, Fall 2016 Dr. Bruce A. Maxwell Department of Computer Science Colby College Course Description Focuses on the common structures used to store data and the standard

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.asp... 1 of 8 8/27/2014 2:15 PM Units: Teacher: ProgIIIAPCompSci, CORE Course: ProgIIIAPCompSci Year: 2012-13 Computer Systems This unit provides an introduction to the field of computer science, and covers the

More information

CS112 Lecture: Primitive Types, Operators, Strings

CS112 Lecture: Primitive Types, Operators, Strings CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

CS Programming I: Primitives and Expressions

CS Programming I: Primitives and Expressions CS 200 - Programming I: Primitives and Expressions Marc Renault Department of Computer Sciences University of Wisconsin Madison Spring 2018 TopHat Sec 3 (AM) Join Code: 427811 TopHat Sec 4 (PM) Join Code:

More information

Interpreted vs Compiled. Java Compile. Classes, Objects, and Methods. Hello World 10/6/2016. Python Interpreted. Java Compiled

Interpreted vs Compiled. Java Compile. Classes, Objects, and Methods. Hello World 10/6/2016. Python Interpreted. Java Compiled Interpreted vs Compiled Python 1 Java Interpreted Easy to run and test Quicker prototyping Program runs slower Compiled Execution time faster Virtual Machine compiled code portable Java Compile > javac

More information

Lecture Set 2: Starting Java

Lecture Set 2: Starting Java Lecture Set 2: Starting Java 1. Java Concepts 2. Java Programming Basics 3. User output 4. Variables and types 5. Expressions 6. User input 7. Uninitialized Variables 0 This Course: Intro to Procedural

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University CS 112 Introduction to Computing II Wayne Snyder Department Boston University Today: Java basics: Compilation vs Interpretation Program structure Statements Values Variables Types Operators and Expressions

More information

CS 152: Data Structures with Java Hello World with the IntelliJ IDE

CS 152: Data Structures with Java Hello World with the IntelliJ IDE CS 152: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Electrical and Computer Engineering building

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University CS 112 Introduction to Computing II Wayne Snyder Department Boston University Today: Java expressions and operators concluded Java Statements: Conditionals: if/then, if/then/else Loops: while, for Next

More information

About this exam review

About this exam review Final Exam Review About this exam review I ve prepared an outline of the material covered in class May not be totally complete! Exam may ask about things that were covered in class but not in this review

More information

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University CS5000: Foundations of Programming Mingon Kang, PhD Computer Science, Kennesaw State University Overview of Source Code Components Comments Library declaration Classes Functions Variables Comments Can

More information

CSI33 Data Structures

CSI33 Data Structures Outline Department of Mathematics and Computer Science Bronx Community College October 24, 2018 Outline Outline 1 Chapter 8: A C++ Introduction For Python Programmers Expressions and Operator Precedence

More information

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

4 Programming Fundamentals. Introduction to Programming 1 1

4 Programming Fundamentals. Introduction to Programming 1 1 4 Programming Fundamentals Introduction to Programming 1 1 Objectives At the end of the lesson, the student should be able to: Identify the basic parts of a Java program Differentiate among Java literals,

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

Introduction to Java Applications

Introduction to Java Applications 2 Introduction to Java Applications OBJECTIVES In this chapter you will learn: To write simple Java applications. To use input and output statements. Java s primitive types. Basic memory concepts. To use

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. Today! Build HelloWorld yourself in BlueJ and Eclipse. Look at all the Java keywords. Primitive Types. HelloWorld in BlueJ 1. Find BlueJ in the start menu, but start the Select VM program instead (you

More information

CS111: PROGRAMMING LANGUAGE II

CS111: PROGRAMMING LANGUAGE II 1 CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 1: Introduction Lecture Contents 2 Course info Why programming?? Why Java?? Write once, run anywhere!! Java basics Input/output Variables

More information

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) Methods (Deitel chapter 6) 1 Plan 2 Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers

More information

Games Course, summer Introduction to Java. Frédéric Haziza

Games Course, summer Introduction to Java. Frédéric Haziza Games Course, summer 2005 Introduction to Java Frédéric Haziza (daz@it.uu.se) Summer 2005 1 Outline Where to get Java Compilation Notions of Type First Program Java Syntax Scope Class example Classpath

More information

Lecture 2. Examples of Software. Programming and Data Structure. Programming Languages. Operating Systems. Sudeshna Sarkar

Lecture 2. Examples of Software. Programming and Data Structure. Programming Languages. Operating Systems. Sudeshna Sarkar Examples of Software Programming and Data Structure Lecture 2 Sudeshna Sarkar Read an integer and determine if it is a prime number. A Palindrome recognizer Read in airline route information as a matrix

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

Objectives. In this chapter, you will:

Objectives. In this chapter, you will: Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates arithmetic expressions Learn about

More information

CONTENTS: Compilation Data and Expressions COMP 202. More on Chapter 2

CONTENTS: Compilation Data and Expressions COMP 202. More on Chapter 2 CONTENTS: Compilation Data and Expressions COMP 202 More on Chapter 2 Programming Language Levels There are many programming language levels: machine language assembly language high-level language Java,

More information

Mr. Monroe s Guide to Mastering Java Syntax

Mr. Monroe s Guide to Mastering Java Syntax Mr. Monroe s Guide to Mastering Java Syntax Getting Started with Java 1. Download and install the official JDK (Java Development Kit). 2. Download an IDE (Integrated Development Environment), like BlueJ.

More information

CS11 Java. Fall Lecture 1

CS11 Java. Fall Lecture 1 CS11 Java Fall 2006-2007 Lecture 1 Welcome! 8 Lectures Slides posted on CS11 website http://www.cs.caltech.edu/courses/cs11 7-8 Lab Assignments Made available on Mondays Due one week later Monday, 12 noon

More information

Values and Variables 1 / 30

Values and Variables 1 / 30 Values and Variables 1 / 30 Values 2 / 30 Computing Computing is any purposeful activity that marries the representation of some dynamic domain with the representation of some dynamic machine that provides

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) 1 Plan 2 Methods (Deitel chapter ) Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Chapter 4 Introduction to Control Statements

Chapter 4 Introduction to Control Statements Introduction to Control Statements Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives 2 How do you use the increment and decrement operators? What are the standard math methods?

More information

2 rd class Department of Programming. OOP with Java Programming

2 rd class Department of Programming. OOP with Java Programming 1. Structured Programming and Object-Oriented Programming During the 1970s and into the 80s, the primary software engineering methodology was structured programming. The structured programming approach

More information

3. Java - Language Constructs I

3. Java - Language Constructs I Educational Objectives 3. Java - Language Constructs I Names and Identifiers, Variables, Assignments, Constants, Datatypes, Operations, Evaluation of Expressions, Type Conversions You know the basic blocks

More information

Review for Test 1 (Chapter 1-5)

Review for Test 1 (Chapter 1-5) Review for Test 1 (Chapter 1-5) 1. Introduction to Computers, Programs, and Java a) What is a computer? b) What is a computer program? c) A bit is a binary digit 0 or 1. A byte is a sequence of 8 bits.

More information

ARG! Language Reference Manual

ARG! Language Reference Manual ARG! Language Reference Manual Ryan Eagan, Mike Goldin, River Keefer, Shivangi Saxena 1. Introduction ARG is a language to be used to make programming a less frustrating experience. It is similar to C

More information

C++ Programming: From Problem Analysis to Program Design, Third Edition

C++ Programming: From Problem Analysis to Program Design, Third Edition C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 2: Basic Elements of C++ Objectives (continued) Become familiar with the use of increment and decrement operators Examine

More information

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010 CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please

More information

Entry Point of Execution: the main Method. Elementary Programming. Learning Outcomes. Development Process

Entry Point of Execution: the main Method. Elementary Programming. Learning Outcomes. Development Process Entry Point of Execution: the main Method Elementary Programming EECS1021: Object Oriented Programming: from Sensors to Actuators Winter 2019 CHEN-WEI WANG For now, all your programming exercises will

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

XQ: An XML Query Language Language Reference Manual

XQ: An XML Query Language Language Reference Manual XQ: An XML Query Language Language Reference Manual Kin Ng kn2006@columbia.edu 1. Introduction XQ is a query language for XML documents. This language enables programmers to express queries in a few simple

More information

CS201 Latest Solved MCQs

CS201 Latest Solved MCQs Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Programming Language Concepts: Lecture 2

Programming Language Concepts: Lecture 2 Programming Language Concepts: Lecture 2 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2011 PLC 2011, Lecture 2, 6 January 2011 Classes and

More information

Visual C# Instructor s Manual Table of Contents

Visual C# Instructor s Manual Table of Contents Visual C# 2005 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional Projects Additional Resources Key Terms

More information

TED Language Reference Manual

TED Language Reference Manual 1 TED Language Reference Manual Theodore Ahlfeld(twa2108), Konstantin Itskov(koi2104) Matthew Haigh(mlh2196), Gideon Mendels(gm2597) Preface 1. Lexical Elements 1.1 Identifiers 1.2 Keywords 1.3 Constants

More information

Introduction to Java & Fundamental Data Types

Introduction to Java & Fundamental Data Types Introduction to Java & Fundamental Data Types LECTURER: ATHENA TOUMBOURI How to Create a New Java Project in Eclipse Eclipse is one of the most popular development environments for Java, as it contains

More information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

Introduction to Java

Introduction to Java Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn

More information

Introduction to Computer Science Unit 2. Notes

Introduction to Computer Science Unit 2. Notes Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and

More information

Data Types, Variables and Arrays. OOC 4 th Sem, B Div Prof. Mouna M. Naravani

Data Types, Variables and Arrays. OOC 4 th Sem, B Div Prof. Mouna M. Naravani Data Types, Variables and Arrays OOC 4 th Sem, B Div 2016-17 Prof. Mouna M. Naravani Identifiers in Java Identifiers are the names of variables, methods, classes, packages and interfaces. Identifiers must

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Computer Programming, I. Laboratory Manual. Final Exam Solution

Computer Programming, I. Laboratory Manual. Final Exam Solution Think Twice Code Once The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2005 Khaleel I. Shaheen Computer Programming, I Laboratory Manual Final Exam Solution

More information

Outline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors

Outline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors Outline Overview history and advantage how to: program, compile and execute 8 data types 3 types of errors Control statements Selection and repetition statements Classes and methods methods... 2 Oak A

More information

CS110: PROGRAMMING LANGUAGE I

CS110: PROGRAMMING LANGUAGE I CS110: PROGRAMMING LANGUAGE I Computer Science Department Lecture 4: Java Basics (II) A java Program 1-2 Class in file.java class keyword braces {, } delimit a class body main Method // indicates a comment.

More information

Methods: A Deeper Look

Methods: A Deeper Look 1 2 7 Methods: A Deeper Look OBJECTIVES In this chapter you will learn: How static methods and variables are associated with an entire class rather than specific instances of the class. How to use random-number

More information

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02

Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Java Basics Lecture 02 Hello, in this lecture we will learn about some fundamentals concepts of java.

More information

Outline. Parts 1 to 3 introduce and sketch out the ideas of OOP. Part 5 deals with these ideas in closer detail.

Outline. Parts 1 to 3 introduce and sketch out the ideas of OOP. Part 5 deals with these ideas in closer detail. OOP in Java 1 Outline 1. Getting started, primitive data types and control structures 2. Classes and objects 3. Extending classes 4. Using some standard packages 5. OOP revisited Parts 1 to 3 introduce

More information

PROGRAMMING FUNDAMENTALS

PROGRAMMING FUNDAMENTALS PROGRAMMING FUNDAMENTALS Q1. Name any two Object Oriented Programming languages? Q2. Why is java called a platform independent language? Q3. Elaborate the java Compilation process. Q4. Why do we write

More information

What did we talk about last time? Examples switch statements

What did we talk about last time? Examples switch statements Week 4 - Friday What did we talk about last time? Examples switch statements History of computers Hardware Software development Basic Java syntax Output with System.out.print() Mechanical Calculation

More information

THE CONCEPT OF OBJECT

THE CONCEPT OF OBJECT THE CONCEPT OF OBJECT An object may be defined as a service center equipped with a visible part (interface) and an hidden part Operation A Operation B Operation C Service center Hidden part Visible part

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK

HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK COURSE / SUBJECT Introduction to Programming KEY COURSE OBJECTIVES/ENDURING UNDERSTANDINGS OVERARCHING/ESSENTIAL SKILLS OR QUESTIONS Introduction to Java Java Essentials

More information

JVM (java) compiler. A Java program is either a library of static methods (functions) or a data type definition

JVM (java) compiler. A Java program is either a library of static methods (functions) or a data type definition Programming Model Basic Structure of a Java Program The Java workflow editor (Code) P.java compiler (javac) P.class JVM (java) output A Java program is either a library of static methods (functions) or

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Lecture 5 Tao Wang 1

Lecture 5 Tao Wang 1 Lecture 5 Tao Wang 1 Objectives In this chapter, you will learn about: Selection criteria Relational operators Logical operators The if-else statement Nested if statements C++ for Engineers and Scientists,

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Chapter 3. Selections

Chapter 3. Selections Chapter 3 Selections 1 Outline 1. Flow of Control 2. Conditional Statements 3. The if Statement 4. The if-else Statement 5. The Conditional operator 6. The Switch Statement 7. Useful Hints 2 1. Flow of

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

9/5/2018. Overview. The C Programming Language. Transitioning to C from Python. Why C? Hello, world! Programming in C

9/5/2018. Overview. The C Programming Language. Transitioning to C from Python. Why C? Hello, world! Programming in C Overview The C Programming Language (with material from Dr. Bin Ren, William & Mary Computer Science) Motivation Hello, world! Basic Data Types Variables Arithmetic Operators Relational Operators Assignments

More information