Welcome to Visual Programming using C#

Slides:



Advertisements
Similar presentations
©2004 Brooks/Cole Chapter 2 Variables, Values and Operations.
Advertisements

Introduction to Computers and Programming Lecture 7:
1 9/20/06CS150 Introduction to Computer Science 1 Review: Exam 1.
Chapter 2 Data Types, Declarations, and Displays
Basic Elements of C++ Chapter 2.
VARIABLES, TYPES, INPUT/OUTPUT, ASSIGNMENT OPERATION Shieu-Hong Lin MATH/CS Department Chapel.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Outline Variables 1.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Chapter 2: Using Data.
Summary of what we learned yesterday Basics of C++ Format of a program Syntax of literals, keywords, symbols, variables Simple data types and arithmetic.
Lecture #5 Introduction to C++
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Week 1 Algorithmization and Programming Languages.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
1 st Semester Module2 Basic C# Concept อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering.
Applications Development
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Introduction to Programming Lecture 2 Msury Mahunnah, Department of Informatics, Tallinn University of Technology.
What the Course is About 1 Welcome to Adv. Visual Programming using C#
1 st Semester Module2 Basic C# Concept อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Egyptian Language School Computer Department
Introduction to Programming Lecture 2
Chapter 2 Variables.
Chapter Topics The Basics of a C++ Program Data Types
JAVA MULTIPLE CHOICE QUESTION.
Welcome to Adv. Java Programming
CSc 020: Programming Concepts and Methodology II
Expressions.
Announcements Midterm2 Grades to be announced THIS WEEK
Tokens in C Keywords Identifiers Constants
Computing Fundamentals
Data Types, Arithmetic Operations
ITEC113 Algorithms and Programming Techniques
Basic Elements of C++.
Object Oriented Programming
Data Types, Identifiers, and Expressions
C++, OBJECT ORIENTED PROGRAMMING
Bit Operations Horton pp
Computing with C# and the .NET Framework
Java Programming: From Problem Analysis to Program Design, 4e
Basic Elements of C++ Chapter 2.
Lecturer: Mukhtar Mohamed Ali “Hakaale”
VISUAL BASIC.
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I UTPA – Fall 2012 This set of slides is revised from lecture slides.
.Net Programming with C#
Announcements Midterm2 Grades to be announced NEXT Monday
Introduction to Java, and DrJava part 1
Chapter 3: Introduction to Problem Solving and Control Statements
CS111 Computer Programming
Chapter 2 Variables.
PHP.
Introduction to Java, and DrJava
elementary programming
Announcements Final will be NEXT WEEK on August 17
Summary of what we learned yesterday
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2017
Primitive Types and Expressions
Module 2 Variables, Data Types and Arithmetic
Subject:Object oriented programming
Introduction to Java, and DrJava part 1
Chapter 2 Variables.
Variables and Constants
Bit Operations Horton pp
CS313T Advanced Programming language
Presentation transcript:

Welcome to Visual Programming using C# What the Course is About

Course info Instructor: Yrd. Doç. Dr. Cengiz Örencik E-mail: cengizorencik@beykent.edu.tr Course material http://myweb.sabanciuniv.edu/cengizo/courses all the notes / codes will be shared there

Book Not required You may use any programming book on C# Microsoft Visual C# .NET step by step John Sharp and Jon Jagger

Grading Midterm 30% Inclass quizes (2) 20% (10+10) Final 50% Hws Mostly coding Self study Not be graded

Aims to learn Developing an algorithmic way of thinking The nature of object oriented programming Operators, precedence Class, objects, methods etc. Building big programs using small ones. Test/debug Inheritance, polymorphism …. GUI design Toolbox and control properties Event driven programming Exception handling

Tentative Outline Classes (constructor, properties, access/modify) Methods (overloading, pass by reference, scope of variables…) Introduction to visual programming (textbox, buttons, checkbox, radiobuton, timer…) Control statements (if-else, switch, while, for, do-while) Arrays, strings (sorting, searching) Recursion Inheritance and Polymorphism Generics (type independent) Exception handling Files and streams

Getting started You will need an integrated development environment (IDE) Download Visual Studio Community 2015 https://catalog.imagine.microsoft.com/en-us/catalog If you already have a running visual studio you may go on with it, they are more or less the same If you prefer an open source IDE, you may use SharpDevelop Almost the same interface with visual studio http://www.icsharpcode.net/OpenSource/SD/Download/

Add 3 Number Lets do it from scratch First as console application Next as Visual Read input/write output

Data Types Char String Bool For single character Digits, letters, symbols… One byte (8 bit) Can store 28 = 256 different values String Any set of chars (words, sentences) Can be arbitrarily long More tecnically, string is a class Bool True / false

Numeric Types int (short / long) signed versus unsigned integers integer numbers no infinity in computers  limited range 4 bytes (32 bits) integer range: –2,147,483,648 ... 2,147,483,647 for 32-bit computers why? signed versus unsigned integers you can put signed or unsigned keywords before the type unsigned integers use the same amount of bits but ranges are different 32-bit: 0 ... 4,294,967,295 (232 –1) Double 8 bytes (64 bits) 3.14159 -2.5 5.43e21

Arithmetic Operations Mixed type expressions what if one operator is int other is double? integer is converted into double before operation 5.0 * 8 is 40.0 5 / 10 is 0 (integer division) 5.0 / 10 is 0.5 (real division) 10 – 8 is 2 (integer) 10 – 8.0 is 2.0 (double)

Expressions with several operators You can use parentheses in expressions to group them Open ( and close ) parentheses should match Rule 1: Parenthesized sub-expressions are evaluated first inside to out Rule 2: Within an expression/subexpression if there are several operators, use operator precedence, evaluate * / % before + - Rule 3: If the operators are in the same expression/subexpression and at the same precedence level, then associativity rule applies evaluate operators from left-to-right Examples (5 - 3 * (7 - 3)) * 8 is -56 10 / 2 * 6 / 2 + (5 - 3 * (2 - 1)) is 17

Expressions with several operators Are the following expressions equivalent? (40 – 32) * 5 / 9 (40 – 32) * (5 / 9) NO, first one is 4, second one is 0 What about this? (40 – 32.0) * 5 / 9 Operations are double operations. Result is 4.44444 See the example Arithmeticoperations – console circleArea – Windows