Automatic assessment of students program codes
|
|
- Griselda Barber
- 5 years ago
- Views:
Transcription
1 Automatic assessment of students program codes Ahmed Hashim June 22, Introduction Automatic assessment provides an effective method for giving immediate 24/7 feedback service for students of mass courses [MKS02]. The aim of automatic assessment system is not only to reduce the grading time on the teaching staff, but also to increase the quality of students programs by assessing them and providing helpful feedback to the students. Nowadays, there are several programming languages, which are found to be difficult for a novice programmer to understand. According to Robins [RRR03], students have often difficulties in building mental model of computer programs, since a programming language differs from the structure of natural language. Even when the students have learned the programming concepts and languages, they may still lack the skills for using this knowledge to create computer programs. Moreover, novice programmers are usually not very good at evaluating their own programs, as even incorrect programs can seem to work as desired [AMJ04]. For this reason, automatic assessment of students program codes without direct helpful feedback is a useless task. In this paper, we consider techniques for automatic assessment of students program codes. Section 2 describes the three common kinds of programming languages and provides example codes for each one. Section 3 describes the assessing students programs and shows the common errors of the novice programmers. An automatic assessment system is proposed in Section 4. Finally, conclusions are drawn in Section 5. 1
2 2 Programming languages Programming languages are formal languages that have been designed to express computations. For example, the notation that mathematicians use is a formal language that is particularly good at denoting relationships among numbers and symbols, while natural languages are the languages that people speak, like English, Spanish, and French. This section describes the three common types of programming languages: 1. Procedural programming languages, 2. Logic programming languages, and 3. Object-oriented programming languages. 2.1 Procedural programming language Procedural programming is a way of writing code as an ordered list of instructions, telling the computer what to do. Procedural programming languages are considered as the third generation languages after machine-level, and assembly programming languages. Examples of procedural programming languages are BASIC, Pascal, C and FORTRAN. According to Niklaus Wirth [Wir78], a procedural program is defined as Algorithm + DataStructure. In principle, a programmer has to think in terms of data structures and algorithms for manipulating the data structures in procedural programming languages. For example, a procedural program may instruct the computer to read a number, multiply it by itself, and display the result. This is shown in Program 1, which is written in BASIC language. 2.2 Logic programming language A logic programming language is based on different way of thinking than procedural programming language. The former is based on the formal logic system with operational semantics, which is defined by deduction in that system [Der85], while the latter is based on the separation between instructions and data structures. Logic programming languages and functional programming languages are members of the same class, which is called Declarative programming language. Declarative programming languages are considered 2
3 Program 1 : Calculate the square number Input: Number is any real number Output: Result is Number Number 1 BEGIN 2 CLS clean the screen 3 INPUT Enter a number, Number 4 Result = Number Number 5 PRINT The Result is, Result 6 END as the fourth generation languages. Examples of logic programming languages are Prolog, Mercury and Oz, while examples of functional programming languages are Lisp and Scheme. According to Robert Kowalski [Kow79], a logical program is defined as Logic + Control. In logic programming, a programmer has to think about correctness at the logical level and about efficiency at the operational level. For example, the squaring function for natural number X may be written as a set of tuples as {(0, 0), (1, 1), (2, 4), (3, 9),...}. We can write the abstract form of the same function as sqr = (X, X 2 ).. Program 3 shows the squaring function, which is written in PROLOG language. Program 2 : Calculate the square number Input: X is any real number Output: Y is the result of X X 1 sqr(x, Y ) : Y is X X. 2.3 Object-oriented programming language The object-oriented programming language is a type of programming in which programmers define not only the data type of a data structure, but also the types of operations that can be applied to the data structure. In 3
4 this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. Examples of object-oriented programming language are Ada, C++, and Java. Programming in an object-oriented language requires the programmer to think in terms of a hierarchy of objects and the properties possessed by the objects. Program 3 shows the squaring function, which is written in Java language. Program 3 : Calculate the square number Input: N umber Output: Result 1 class TestSquare{ 2 public static void main(string atg[]){ 3 TestSquare obj=new TestSquare(); 4 int x = System.in.read(); 5 int y = obj.square(x); 6 System.out.println( The result is +y); 7 } 8 public int square(int x){return x*x;} 9 } As a result, several programming languages increase the complexity of automatic assessment process, since any program, which is written by any of the described programming languages, should be assessed based on that language. 3 Assessing students programs Student programmers have difficulty finding and fixing syntax and logic errors in their programs, since several programming languages do not provide enough information to diagnose the difficulties of the students program codes during the compilation process. This section describes the common errors of the novice programmers and gives a short overview of existing systems for assessing programs. 4
5 Typically common errors of the novice programmers can be classified into two categories: 1. Syntax errors, and 2. Logical errors. 3.1 Syntax errors A syntax error is a fatal error that the programmer must correct before being able to fully compile the program. Usually compilers diagnose the syntax errors by displaying an error message of the problem and also the location where it occurs. Examples of syntax errors are mistyping the name of the variable or forgetting to close a string, mismatched parentheses or braces. For example, a novice programmer may mistype the name of the variable. This is shown in line 4 of Program 4. Program 4 : Calculate the square number Input: Number is any real number Output: Result is Number Number 1 BEGIN 2 CLS 3 INPUT Enter a number, Number 4 Result = Num Num Remark for a syntax error 5 PRINT The Result is, Result 6 END 3.2 Logical errors A logical error is a mistake in the meaning or logic of the program. Unlike syntax error, logical errors are the most difficult ones to locate because there is generally no information available about the source of error. That is why the logical errors are more interesting than the syntax errors, because the former allow the teacher to identify the most common conceptual errors, which are made by novice programmers. Examples of logical errors include type mismatch, uninitialized variables, dividing by zero, and an infinite loop. For example, a novice programmer may forget to initialize the variables. This is 5
6 shown in line 1 of Program 5. Program 5 : Calculate the square number Input: X is a real number Output: Y is the result of X X 1 sqr(x, Y ) : Y is Y X. Remark for a semantic error or logical error As a result, to assess the students programs, we need to detect and diagnose the logical errors, which may be found in these programs. 4 Automatic assessment systems An automatic assessment system is software that takes the students program codes as an input, assesses the programs without need for human intervention, and generates useful feedback based on the assessment criteria. This section describes related research in the area of automatic assessments and presents the architecture of our proposed automatic assessment system. 4.1 Related research A student program can be assessed in various ways which include correctness, efficiency, complexity and style. Examples of existed systems are ASSYST [JU97] and CAP [Sch95]. Both of systems perform a static analysis. A static analysis is the process of examining source code without executing the program. The main aim of static analysis is to determine the quality of students programs. ASSYST is (ASsessment SYSTem) tool that assess the students programs. ASSYST assesses and grades a student program automatically based on five phases: correctness, efficiency, complexity, style and data testing. ASSYST tool may use to assess Ada and C programming languages. Figure 1 shows the assessment process of ASSYST. 6
7 Figure 1: ASSYST assessment process CAP is (Code Analyzer for Pascal) tool that analyze only the subset of Pascal language. The tool checks the student program and informs the student what is wrong, why it is wrong and how to fix the problem. CAP can diagnose three types of errors: syntax errors, logical errors, and style errors. A style error is an incorrect in the commenting declarations, commenting formal parameters, or indenting nested statements [MMNS83]. Figure 2 shows the assessment process of CAP. Figure 2: CAP assessment process 7
8 4.2 Automatic assessment architecture The main goal of our proposed automatic assessment system is to assess the students programs based on correctness, efficiency, complexity, style and data testing. Also, the system must generate helpful and clear feedback that shows what is wrong, why it is wrong and how to fix the problem. This feedback enhances the student s learning experience and increases the quality of students programs as well. In addition, the system must be capable of storing and retrieving the assessment process information, which includes the student s program, the student s mistakes, and the feedback of the system. Otherwise it will not help the educational process. Figure 3: Overview of the architecture Figure 3 illustrates a proposed automatic assessment system from components point of view. The system combines the functionalities of both of assessment and code analyzer into three main components: code analyzer, style analyzer and performance analyzer. Code analyzer detects the syntax and logical errors, and generates code report. Style analyzer detects the style and comment errors, and generates style report. Performance analyzer detects program complexity, program outputs, and program efficiency. performance analyzer generates performance report. The system generates the 8
9 feedback by combining the three reports, and informs the student the final results. 5 Conclusions The advantage of automatic assessment system is that it provides helpful and immediate feedback to the student without need for human intervention. However, designing and implementing automatic assessment of students program codes is still a complicated task, because it depends not only on programming the type of the programming language which is used, but also on the methods and techniques that are used to evaluate the students program codes. The main objective of this paper is to show the requirements of automatic assessment in order to achieve automatic assessment of students program codes. Finally, we hope that our paper will promote other systems to foucs on the requirements of automatic assessment, and apply these requirements in thier environments, as well. References [AMJ04] Kirsti Ala-Mutka and Hannu-Matti Jarvinen. Assessment process for programming assignments. pages , Washington, DC, USA, IEEE Computer Society. [Der85] Nachum Dershowitz. Synthetic programming. Artif. Intell., 25(3): , [JU97] [Kow79] [MKS02] David Jackson and Michelle Usher. Grading student programs using assyst. pages , New York, NY, USA, ACM Press. Robert Kowalski. Algorithm = logic + control. Commun. ACM, 22(7): , Lauri Malmi, Ari Korhonen, and Riku Saikkonen. Experiences in automatic assessment on mass courses and issues for designing virtual courses. pages 55 59, New York, NY, USA, ACM Press. [MMNS83] Richard J. Miara, Joyce A. Musselman, Juan A. Navarro, and Ben Shneiderman. Program indentation and comprehensibility. Commun. ACM, 26(11): ,
10 [RRR03] Robins, Rountree, and Rountree. Learning and teaching programming: A review and discussion. Computer Science Education, 13(2): , [Sch95] [Wir78] Tom Schorsch. Cap: an automated self-assessment tool to check pascal programs for syntax, logic and style errors. pages , New York, NY, USA, ACM Press. Niklaus Wirth. Algorithms + Data Structures = Programs. Prentice Hall PTR, Upper Saddle River, NJ, USA,
An Enhanced Generic Automated Marking Environment: GAME-2
An Enhanced Generic Automated Marking Environment: GAME-2 Author Matloobi, Roozbeh, Blumenstein, Michael, Green, Steven Published 2007 Conference Title Proceedings of the International Conference on Interactive
More informationCOURSE TITLE. Computer Programming C++ LENGTH. One Semester Grades DEPARTMENT. Computer Department Barbara O Donnell, Supervisor SCHOOL
COURSE TITLE Computer Programming C++ LENGTH One Semester Grades 10-12 DEPARTMENT Computer Department Barbara O Donnell, Supervisor SCHOOL Rutherford High School DATE Spring 2017 Computer Programming C++
More informationCIS24 Project #3. Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec. Subject: Functional Programming Language (ML)
CIS24 Project #3 Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec Subject: Functional Programming Language (ML) 1 Introduction ML Programming Language Functional programming
More informationAn Enhanced Generic Automated Marking Environment: GAME-2
An Enhanced Generic Automated Marking Environment: GAME-2 Author Matloobi, R., Blumenstein, Michael, Green, Steven Published 2007 Journal Title IEEE Multidisciplinary Engineering Education Magazine Copyright
More informationTESTING AND DEBUGGING
TESTING AND DEBUGGING zombie[1] zombie[3] Buuuuugs zombie[4] zombie[2] zombie[5] zombie[0] Fundamentals of Computer Science I Outline Debugging Types of Errors Syntax Errors Semantic Errors Logic Errors
More informationIntroduction 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 informationIntroduction to Computer Programming Using FORTRAN 77
Introduction to Computer Programming Using FORTRAN 77 Al-Dhaher, K. Garout, Y. Lafi, A. Al-Muhtaseb, H. Nazzal, A. Saeed, M. Yazdani, J. Zeidan, Y. August 1995 Second Edition Information and Computer Science
More informationModule 1: Introduction to Computers, Programs, and Java
Module 1: Introduction to Computers, Programs, and Java Module 1: Introduction to Java page 1 Objectives To review Program Design and Problem-Solving Techniques To describe the relationship between Java
More informationA sample algorithm to calculate someone s wages for the week might look like:
CS201 Lecture Notes, Mock Overview of Programming What is programming? Quite simply it is planning or scheduling the performance of some task or event. In the context of computers, computer programming
More informationCS101 Introduction to Programming Languages and Compilers
CS101 Introduction to Programming Languages and Compilers In this handout we ll examine different types of programming languages and take a brief look at compilers. We ll only hit the major highlights
More informationIntroduction to Java. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.
Introduction to Java 1 Programs Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs. Programs are written using programming languages.
More informationAP Computer Science A: Java Programming
AP Computer Science A: Java Programming Zheng-Liang Lu Department of Computer Science & Information Engineering National Taiwan University APcomSci 297 Spring 2018 Class Information Instructor: Zheng-Liang
More informationOrganization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?
Organization of Programming Languages (CSE452) Instructor: Dr. B. Cheng Fall 2004 1 Why are there so many programming languages? Evolution -- we've learned better ways of doing things over time Socio-economic
More informationCOMP 201: Principles of Programming
COMP 201: Principles of Programming 1 Learning Outcomes To understand what computing entails and what the different branches of computing are. To understand the basic design of a computer and how it represents
More informationITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University
ITC213: STRUCTURED PROGRAMMING Bhaskar Shrestha National College of Computer Studies Tribhuvan University Lecture 03: Program Development Life Cycle Readings: Not Covered in Textbook Program Development
More informationLecture 10: Introduction to Correctness
Lecture 10: Introduction to Correctness Aims: To look at the different types of errors that programs can contain; To look at how we might detect each of these errors; To look at the difficulty of detecting
More informationLECTURE 3. Compiler Phases
LECTURE 3 Compiler Phases COMPILER PHASES Compilation of a program proceeds through a fixed series of phases. Each phase uses an (intermediate) form of the program produced by an earlier phase. Subsequent
More informationProgramming Syntax and Style. David Greenstein Monta Vista High School
Programming Syntax and Style David Greenstein Monta Vista High School Programming Language Syntax All have: Comments Programmer-defined Names Reserved Words Structure Assembly Code (Amiga 68K) 1950 1960
More informationIntroduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.
Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. 9 Self-Test Exercises p. 11 History Note p. 12 Programming and
More informationWhy is programming difficult?
Why is programming difficult? Proposal for learning programming in small steps and a prototype tool for detecting gaps Yayoi Hofuku 14, Shinya Cho 2, Tomohiro Nishida 3, and Susumu Kanemune 4 1 Sagami
More informationProgram Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.
Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Outline. Abstractions for telling a computer how to do things. Computational Paradigms. Language Definition, Translation.
More informationAP Computer Science A Summer Assignment 2017
AP Computer Science A Summer Assignment 2017 The objective of this summer assignment is to ensure that each student has the ability to compile and run code on a computer system at home. We will be doing
More informationIntroduction 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 informationRepetition with for loops
Repetition with for loops So far, when we wanted to perform a task multiple times, we have written redundant code: System.out.println( Building Java Programs ); // print 5 blank lines System.out.println(
More informationComponent V Supporting Materials / Learn More Interesting Facts. Interesting Facts
Component V Supporting Materials / Learn More 1.4.1 Interesting Facts No. Interesting Facts 1. All computers operate by following machine language programs. 2. Machine language programs are long sequence
More informationAN AGENT BASED INTELLIGENT TUTORING SYSTEM FOR PARAMETER PASSING IN JAVA PROGRAMMING
AN AGENT BASED INTELLIGENT TUTORING SYSTEM FOR PARAMETER PASSING IN JAVA PROGRAMMING 1 Samy Abu Naser 1 Associate Prof., Faculty of Engineering &Information Technology, Al-Azhar University, Gaza, Palestine
More informationProgramming Languages 2nd edition Tucker and Noonan"
Programming Languages 2nd edition Tucker and Noonan" " Chapter 1" Overview" " A good programming language is a conceptual universe for thinking about programming. " " " " " " " " " " " " "A. Perlis" "
More informationCom S 541. Programming Languages I
Programming Languages I Lecturer: TA: Markus Lumpe Department of Computer Science 113 Atanasoff Hall http://www.cs.iastate.edu/~lumpe/coms541.html TR 12:40-2, W 5 Pramod Bhanu Rama Rao Office hours: TR
More informationUNIT I Programming Language Syntax and semantics. Kainjan Sanghavi
UNIT I Programming Language Syntax and semantics B y Kainjan Sanghavi Contents Bird s eye view of programming language concepts Syntax Semantics Pragmatics Programming Language Concepts A programming language
More informationTopic IV. Parameters. Chapter 5 of Programming languages: Concepts & constructs by R. Sethi (2ND EDITION). Addison-Wesley, 1996.
References: Topic IV Block-structured procedural languages Algol and Pascal Chapters 5 and 7, of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapter 5 of Programming languages: Concepts
More informationData Types The ML Type System
7 Data Types 7.2.4 The ML Type System The following is an ML version of the tail-recursive Fibonacci function introduced Fibonacci function in ML in Section 6.6.1: EXAMPLE 7.96 1. fun fib (n) = 2. let
More informationCOMP 110 Prasun Dewan 1
2. Objects COMP 110 Prasun Dewan 1 Now that we have a model of how the computer works, we can address the business-at-hand: how do we program the computer. Using two simple, though realistic, examples,
More informationCHAPTER 2.1 CONTROL STRUCTURES (SELECTION) Dr. Shady Yehia Elmashad
CHAPTER 2.1 CONTROL STRUCTURES (SELECTION) Dr. Shady Yehia Elmashad Outline 1. The if Selection Structure 2. The if/else Selection Structure 3. The switch Multiple-Selection Structure 1. The if Selection
More informationLecture 4. CS118 Term planner. The simple if statement. Control flow: selection. The if... else statement cont... The if... else statement.
1 Lecture 4 CS118 Term planner You should have done, or be working through, problem sheet 2; next is sheet 3 Coursework - common mistakes do while (robot.look(direction) = IRobot.WALL); if (robot.look(irobot.ahead)
More informationCHAPTER 1 Introduction to Computers and Java
CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and
More informationG Programming Languages - Fall 2012
G22.2110-003 Programming Languages - Fall 2012 Lecture 3 Thomas Wies New York University Review Last week Names and Bindings Lifetimes and Allocation Garbage Collection Scope Outline Control Flow Sequencing
More informationDo Languages Matter? Lecture 1: Overview. Why Article. Do Languages Matter? Why choose C vs C++ vs Java vs Python...!
Do Languages Matter? Why choose C vs C++ vs Java vs Python... Lecture 1: Overview CSC 131 Fall, 2014 Kim Bruce What criteria to decide? Scenarios: - ios app - Android App - Web App - Mac App - Windows
More informationKOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)
Programming Concepts & Algorithms Course Syllabus Course Title Course Code Computer Department Pre-requisites Course Code Course Instructor Programming Concepts & Algorithms + lab CPE 405C Computer Department
More informationChapter 1 Lab Algorithms, Errors, and Testing
Chapter 1 Lab Algorithms, Errors, and Testing Lab Objectives Be able to write an algorithm Be able to compile a Java program Be able to execute a Java program using the Sun JDK or a Java IDE Be able to
More informationNew Concepts. Lab 7 Using Arrays, an Introduction
Lab 7 Using Arrays, an Introduction New Concepts Grading: This lab requires the use of the grading sheet for responses that must be checked by your instructor (marked as Question) AND the submission of
More informationBasic computer skills such as using Windows, Internet Explorer, and Microsoft Word. Chapter 1 Introduction to Computers, Programs, and Java
Basic computer skills such as using Windows, Internet Explorer, and Microsoft Word Chapter 1 Introduction to Computers, Programs, and Java Chapter 2 Primitive Data Types and Operations Chapter 3 Selection
More informationTopic IV. Block-structured procedural languages Algol and Pascal. References:
References: Topic IV Block-structured procedural languages Algol and Pascal Chapters 5 and 7, of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapters 10( 2) and 11( 1) of Programming
More informationSKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)
SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2
More informationLow-Level Languages. Computer Programs and Programming Languages
Computer Programs and Programming Languages What is a computer program? Set of instructions that directs computer to perform tasks Programming used to write instructions 1 Computer Programs and Programming
More informationC++ Programming Language Lecture 2 Problem Analysis and Solution Representation
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Program Development Cycle Program development
More informationWorking with JavaScript
Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives
More informationSelec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Spring 2016 Howard Rosenthal
Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Spring 2016 Howard Rosenthal Lesson Goals Understand Control Structures Understand how to control the flow of a program
More informationInformatica 3 Syntax and Semantics
Informatica 3 Syntax and Semantics Marcello Restelli 9/15/07 Laurea in Ingegneria Informatica Politecnico di Milano Introduction Introduction to the concepts of syntax and semantics Binding Variables Routines
More informationCPS122 Lecture: From Python to Java last revised January 4, Objectives:
Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.
More informationOutline. Program development cycle. Algorithms development and representation. Examples.
Outline Program development cycle. Algorithms development and representation. Examples. 1 Program Development Cycle Program development cycle steps: Problem definition. Problem analysis (understanding).
More information1 A question of semantics
PART I BACKGROUND 1 A question of semantics The goal of this chapter is to give the reader a glimpse of the applications and problem areas that have motivated and to this day continue to inspire research
More informationCS 112 Introduction to Programming
CS 112 Introduction to Programming Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University 308A Watson, Phone: 432-6400 Email: yry@cs.yale.edu
More informationAdmin. CS 112 Introduction to Programming. Recap: Java Static Methods. Recap: Decomposition Example. Recap: Static Method Example
Admin CS 112 Introduction to Programming q Programming assignment 2 to be posted tonight Java Primitive Data Types; Arithmetic Expressions Yang (Richard) Yang Computer Science Department Yale University
More information1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.
1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered
More informationSelec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal
Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Fall 2016 Howard Rosenthal Lesson Goals Understand Control Structures Understand how to control the flow of a program
More informationBuilding Java Programs
Building Java Programs Chapter 2: Primitive Data and Definite Loops These lecture notes are copyright (C) Marty Stepp and Stuart Reges, 2007. They may not be rehosted, sold, or modified without expressed
More informationCSCI 3155: Principles of Programming Languages Exam preparation #1 2007
CSCI 3155: Principles of Programming Languages Exam preparation #1 2007 Exercise 1. Consider the if-then-else construct of Pascal, as in the following example: IF 1 = 2 THEN PRINT X ELSE PRINT Y (a) Assume
More informationCompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards
CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards Nevada Course Details: Course Name: Computer Science Primary Cluster: Information and Media Technologies Standards Course Code(s):
More informationControl Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003
Control Flow COMS W1007 Introduction to Computer Science Christopher Conway 3 June 2003 Overflow from Last Time: Why Types? Assembly code is typeless. You can take any 32 bits in memory, say this is an
More informationLecture Notes on Programming Languages
Lecture Notes on Programming Languages 37 Lecture 04: Data Types and Variables All programming languages provide data types. A data type describes a set of data values and a set of predefined operations
More informationComputer Science 21b: Structure and Interpretation of Computer Programs (Spring Term, 2004)
Computer Science 21b: Structure and Interpretation of Computer Programs (Spring Term, 2004) There are only 5 ideas in Computer Science, and by the end of this course, you ll know 3 of them --Harry Mairson
More informationCompilers. Prerequisites
Compilers Prerequisites Data structures & algorithms Linked lists, dictionaries, trees, hash tables Formal languages & automata Regular expressions, finite automata, context-free grammars Machine organization
More informationCONTENTS: Array Usage Multi-Dimensional Arrays Reference Types. COMP-202 Unit 6: Arrays
CONTENTS: Array Usage Multi-Dimensional Arrays Reference Types COMP-202 Unit 6: Arrays Introduction (1) Suppose you want to write a program that asks the user to enter the numeric final grades of 350 COMP-202
More informationCIS133J. Working with Numbers in Java
CIS133J Working with Numbers in Java Contents: Using variables with integral numbers Using variables with floating point numbers How to declare integral variables How to declare floating point variables
More informationProgramming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102
Programming Languages and Program Development Life Cycle Fall 2016 Introduction to Information and Communication Technologies CSD 102 Outline The most common approaches to program design and development
More informationStudent Name: OSIS#: DOB: / / School: Grade:
Grade 5th Math CCLS: Operations and Algebraic Thinking Write and interpret numerical expressions. 5.OA. 5.OA. 5.OA. Use parentheses, brackets, or braces in numerical expressions, and evaluate expressions
More informationCS111: 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 informationPart (04) Introduction to Programming
Part (04) Introduction to Programming Dr. Ahmed M. ElShafee 1 Dr. Ahmed ElShafee, ACU : Summer 2014, Introduction to CS 1 EVOLUTION To write a program for a computer, we must use a computer language. A
More informationTOOLS AND TECHNIQUES FOR TEST-DRIVEN LEARNING IN CS1
TOOLS AND TECHNIQUES FOR TEST-DRIVEN LEARNING IN CS1 ABSTRACT Test-Driven Development is a design strategy where a set of tests over a class is defined prior to the implementation of that class. The goal
More informationCSCI.4430/6969 Programming Languages Lecture Notes
CSCI.4430/6969 Programming Languages Lecture Notes August 28, 2006 1 Brief History of Programming Languages Ada Augusta, the Countess of Lovelace, the daughter of the poet Lord Byron, is attributed as
More informationIntroduction 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 informationTopic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.
Topic I Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapter 1 of Programming languages: Design and implementation (3RD EDITION)
More informationCS 3304 Comparative Languages. Lecture 1: Introduction
CS 3304 Comparative Languages Lecture 1: Introduction 17 January 2012 2012 Denis Gracanin Course Overview 2 Welcome What this course is about? What this course is not about? What will you learn? How will
More informationProgram Development. Program Development. A Foundation for Programming. Program Development
Program Development Program Development Ada Lovelace Introduction to Programming in Java: An Interdisciplinary Approach Robert Sedgewick and Kevin Wayne Copyright 2008 February 11, 2010 8:48 AM 2 A Foundation
More informationProblem Solving with C++
GLOBAL EDITION Problem Solving with C++ NINTH EDITION Walter Savitch Kendrick Mock Ninth Edition PROBLEM SOLVING with C++ Problem Solving with C++, Global Edition Cover Title Copyright Contents Chapter
More information1 st Grade Math Curriculum Crosswalk
This document is designed to help North Carolina educators teach the. NCDPI staff are continually updating and improving these tools to better serve teachers. 1 st Grade Math Curriculum Crosswalk The following
More informationProgram Elements -- Introduction
Program Elements -- Introduction We can now examine the core elements of programming Chapter 3 focuses on: data types variable declaration and use operators and expressions decisions and loops input and
More informationCS A331 Programming Language Concepts
CS A331 Programming Language Concepts Lecture 4 Programming Language Semantics and Code Generation February 3, 2014 Sam Siewert PLP Companion Materials CD-ROM is On-Line: http://booksite.elsevier.com/9780123745149/?isbn=978
More informationCSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York
CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this
More informationCPS122 Lecture: From Python to Java
Objectives: CPS122 Lecture: From Python to Java last revised January 7, 2013 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.
More informationREVIEW AND OUTLOOKS OF THE MEANS FOR VISUALIZATION OF SYNTAX SEMANTICS AND SOURCE CODE. PROCEDURAL AND OBJECT ORIENTED PARADIGM DIFFERENCES
REVIEW AND OUTLOOKS OF THE MEANS FOR VISUALIZATION OF SYNTAX SEMANTICS AND SOURCE CODE. PROCEDURAL AND OBJECT ORIENTED PARADIGM DIFFERENCES Hristo Hristov Abstract. In the article, we have reviewed the
More informationJava Programming Unit 3: Variables and Arithmetic Operations
Java Programming Unit 3: Variables and Arithmetic Operations Bensalem Township School District Standards Link: PA State Standards for Business Education: http://www.pdesas.org/standard/views#114,115,116,117
More informationComputer Programming & Problem Solving ( CPPS )
Computer Programming & Problem Solving ( CPPS ) Chapter No 3 Sir Syed University of Engineering & Technology Computer Engineering Department University Road, Karachi-75300, PAKISTAN Muzammil Ahmad Khan
More informationProgramming Languages
Programming Languages As difficult to discuss rationally as religion or politics. Prone to extreme statements devoid of data. Examples: "It is practically impossible to teach good programming to students
More informationIntroduction To Java. Chapter 1. Origins of the Java Language. Origins of the Java Language. Objects and Methods. Origins of the Java Language
Chapter 1 Getting Started Introduction To Java Most people are familiar with Java as a language for Internet applications We will study Java as a general purpose programming language The syntax of expressions
More informationProcedural Programming
Unit 18: Procedural Unit code: D/601/1293 QCF Level 4: BTEC Higher National Credit value: 15 Aim To provide learners with an understanding of the principles of procedural programming and to enable them
More informationCompiler Design Spring 2018
Compiler Design Spring 2018 Thomas R. Gross Computer Science Department ETH Zurich, Switzerland 1 Logistics Lecture Tuesdays: 10:15 11:55 Thursdays: 10:15 -- 11:55 In ETF E1 Recitation Announced later
More informationCS152 Programming Language Paradigms Prof. Tom Austin, Fall Syntax & Semantics, and Language Design Criteria
CS152 Programming Language Paradigms Prof. Tom Austin, Fall 2014 Syntax & Semantics, and Language Design Criteria Lab 1 solution (in class) Formally defining a language When we define a language, we need
More informationThe descriptions below provide an overview of the mathematical concepts and skills that students explore throughout the 5 th grade.
Mathematics Grade 5 The descriptions below provide an overview of the mathematical concepts and skills that students explore throughout the 5 th grade. Operations and Algebraic Thinking Students build
More informationThe descriptions below provide an overview of the mathematical concepts and skills that students explore throughout the 5 th grade.
Mathematics Grade 5 The descriptions below provide an overview of the mathematical concepts and skills that students explore throughout the 5 th grade. Operations and Algebraic Thinking Students build
More informationPedagogically Effective Subset of C++
2014, TextRoad Publication ISSN: 2090-4274 Journal of Applied Environmental and Biological Sciences www.textroad.com Pedagogically Effective Subset of C++ Muhammad Shoaib Farooq 1,2, Sher Afzal Khan 2,
More informationSystems and Principles Unit Syllabus
Systems and Principles Unit Syllabus Level 2 Creating an event driven computer program using Java 7540-007 www.cityandguilds.com October 2010 Version 2.0 About City & Guilds City & Guilds is the UK s leading
More informationKey Properties for Comparing Modeling Languages and Tools: Usability, Completeness and Scalability
Key Properties for Comparing Modeling Languages and Tools: Usability, Completeness and Scalability Timothy C. Lethbridge Department of Electrical Engineering and Computer Science, University of Ottawa
More informationAtropos User s manual
Atropos User s manual Jan Lönnberg 22nd November 2010 1 Introduction Atropos is a visualisation tool intended to display information relevant to understanding the behaviour of concurrent Java programs,
More informationCONDITIONAL EXECUTION
CONDITIONAL EXECUTION yes x > y? no max = x; max = y; logical AND logical OR logical NOT &&! Fundamentals of Computer Science I Outline Conditional Execution if then if then Nested if then statements Comparisons
More informationCOMP 110 Project 1 Programming Project Warm-Up Exercise
COMP 110 Project 1 Programming Project Warm-Up Exercise Creating Java Source Files Over the semester, several text editors will be suggested for students to try out. Initially, I suggest you use JGrasp,
More informationBM214E Object Oriented Programming Lecture 4
BM214E Object Oriented Programming Lecture 4 Computer Numbers Integers (byte, short, int, long) whole numbers exact relatively limited in magnitude (~10 19 ) Floating Point (float, double) fractional often
More informationMIDTERM EXAMINATION - CS130 - Spring 2003
MIDTERM EXAMINATION - CS130 - Spring 2003 Your full name: Your UCSD ID number: This exam is closed book and closed notes Total number of points in this exam: 120 + 10 extra credit This exam counts for
More informationWhen Brunel s ship the SS Great Britain was launched into the River Thames, it made such a splash that several spectators on the opposite bank were
C. A. R. Hoare Emeritus Professor of Computing at the University of Oxford and is now a senior researcher at Microsoft Research in Cambridge, England. He received the 1980 ACM Turing Award for his fundamental
More informationHarvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists HST 952. Computing for Biomedical Scientists
Harvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists HST 952 Computing for Biomedical Scientists Introduction Medical informatics is interdisciplinary, and
More information