EEE-425 Programming Languages (2013) 1

Similar documents
EEE-425 Programming Languages (2013) 1

Creating and Running Your First C# Program

10/9/2012. Sample C# program:

Chapter 1: A First Program Using C#

Programming in Visual Basic with Microsoft Visual Studio 2010

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

New programming language introduced by Microsoft contained in its.net technology Uses many of the best features of C++, Java, Visual Basic, and other

Apex TG India Pvt. Ltd.

Dot Net Online Training

.Net. Course Content ASP.NET

Unit 1: Visual Basic.NET and the.net Framework

Introduction to.net, C#, and Visual Studio. Part I. Administrivia. Administrivia. Course Structure. Final Project. Part II. What is.net?

Team Developer. There are no good reasons to stay in legacy mode.

A NET Refresher

DOT NET Syllabus (6 Months)

DOT NET SYLLABUS FOR 6 MONTHS

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations

Introduction to Web Development with Microsoft Visual Studio 2010 (10267A)

10264A CS: Developing Web Applications with Microsoft Visual Studio 2010

Migrate Your Skills to Microsoft.NET Framework 2.0 and 3.0 using Visual Studio 2005 (C#)

Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500

Module 1. An Introduction to C# Module 2. Classes and Objects. Vasundhara Sector 14-A, Plot No , Near Vaishali Metro Station,Ghaziabad

This web service can be available to any user on the internet regardless of who developed it.

Chapter 1 Getting Started

10267A CS: Developing Web Applications Using Microsoft Visual Studio 2010

Introduce C# as Object Oriented programming language. Explain, tokens,

COURSE OUTLINE: OD10267A Introduction to Web Development with Microsoft Visual Studio 2010

Programming in C# with Microsoft Visual Studio 2010

Introducing C# and the.net Framework

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Introduction to.net Framework Week 1. Tahir Nawaz

Introduction to.net Framework

INTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)

Top 40.NET Interview Questions & Answers

Program Contents: DOTNET TRAINING IN CHENNAI

CS313T ADVANCED PROGRAMMING LANGUAGE

Microsoft Visual Studio 2010

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

.NET-6Weeks Project Based Training

INFORMATICS LABORATORY WORK #2

Fundamental C# Programming

What s new in ASP.NET 3.5? Mike Ormond Developer & Platform Group Microsoft Ltd

DEVELOPING WEB APPLICATIONS WITH MICROSOFT VISUAL STUDIO Course: 10264A; Duration: 5 Days; Instructor-led

C# is intended to be a simple, modern, general-purpose, objectoriented programming language. Its development team is led by Anders Hejlsberg.

ASP.NET Web Forms Programming Using Visual Basic.NET

Introduction to Web Development with Microsoft Visual Studio 2010

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

Chapter 1:- Introduction to.net. Compiled By:- Ankit Shah Assistant Professor, SVBIT.

Introduction to Microsoft.NET Programming Using Microsoft Visual Studio 2008 (C#) Course Overview. Prerequisites. Audience.

10266 Programming in C Sharp with Microsoft Visual Studio 2010

.NET 4.6 MICROSOFT CURRICULUM MICROSOFT.NET 2015 (4.6)

Yoon Joong Kim. Department of computer Engineering Hanbat National University

Software Development & Education Center Complete.NET 4.5

UNIT I An overview of Programming models Programmers Perspective

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Advanced WCF 4.0 .NET. Web Services. Contents for.net Professionals. Learn new and stay updated. Design Patterns, OOPS Principles, WCF, WPF, MVC &LINQ

Developing Data Access Solutions with Microsoft Visual Studio 2010

C# Syllabus. MS.NET Framework Introduction

C# Programming: From Problem Analysis to Program Design. Fourth Edition

This tutorial has been prepared for the beginners to help them understand basics of c# Programming.

DE-2310 Developing Web Applications Using Microsoft Visual Studio 2008 SP1

COPYRIGHTED MATERIAL. Part I The C# Ecosystem. ChapTEr 1: The C# Environment. ChapTEr 2: Writing a First Program

Language Constructs and Environment

10267 Introduction to Web Development with Microsoft Visual Studio 2010

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

Web Platform Introduction With a focus on free. Mike Taulty Developer & Platform Group Microsoft Ltd

An Introduction to.net for the J2EE Programmer

Course Outline: Course 10267A: Introduction to Web Development with Microsoft Visual Studio 2010 Learning Method: Instructor-led Classroom Learning

Model Question Paper. Credits: 4 Marks: 140. Part A (One mark questions)

2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a) and (b) D. stands for Graphic Use Interaction

..to the Berlin BAU Software Lab! Let's have two interesting weeks together! (c)schmiedecke C# and.net

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

DE Introduction to Web Development with Microsoft Visual Studio 2010

S.Sakthi Vinayagam Sr. AP/CSE, C.Arun AP/IT

Course Hours

DOT NET COURSE BROCHURE

Microsoft ASP.NET Whole Course Syllabus upto Developer Module (Including all three module Primary.NET + Advance Course Techniques+ Developer Tricks)

C# Programming in the.net Framework

PES INSTITUTE OF TECHNOLOGY

Microsoft..NET Framework. Overview

WA2 PRACTICE A. Windows Azure Platform Introduction

DC69 C# &.NET JUNE C# is a simple, modern, object oriented language derived from C++ and Java.

Microsoft Visual Studio 2010 Training Course Catalogue. Learning Solutions

Programming in C# for Experienced Programmers

Darshan Institute of Engineering & Technology for Diploma Studies

.NET Advance Package Syllabus

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

DIPLOMA IN PROGRAMMING WITH DOT NET TECHNOLOGIES

Very similar to Java C++ C-Based syntax (if, while, ) object base class no pointers, object parameters are references All code in classes

Introduction to Mobile Development

Developing Web Applications Using Microsoft Visual Studio 2008 SP1

The course introduces many of the techniques and technologies employed by modern desktop and enterprise applications, including:

Chapter 12 Microsoft Assemblies. Software Architecture Microsoft Assemblies 1

"Charting the Course... MOC A Introduction to Web Development with Microsoft Visual Studio Course Summary

Programming C# 5.0. Ian Griffiths O'REILLY' Beijing Cambridge * Farnham Kbln Sebastopol Tokyo

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

Learn to develop.net applications and master related technologies.

Transcription:

2 Computer programming: creating a sequence of instructions to enable the computer to do something Programmers do not use machine language when creating computer programs. Instead, programmers tend to use high-level programming languages Each high-level language has its own syntax and limited set of vocabulary that is translated into machine code by a compiler Define a task/problem = Specification Plan your solution = Design Find suitable algorithm to solve it Find suitable data structures to use Write code Fix program error (bugs) Make your customer happy = Implementation = Testing & Debugging = Deployment 3 4 Wikipedia.org definition for C#. Object-oriented. Primarily imperative or procedural. LINQ (Language Integrated Query) adds some functional programming language capabilities. Structured (as opposed to monolithic). Strongly typed. ISO(International Organization for Standardization) and ECMA(European Computer Manufacturers Association) standardized. Programming language A syntax that allow to give instructions to the computer C# features: New cutting edge language Extremely powerful Easy to learn Easy to read and understand Object-oriented 5 6 EEE-425 Programming Languages (2013) 1

Object-oriented programming is an extension of procedural programming, which in addition to variables and procedures contains: objects, classes, encapsulation, interfaces, polymorphism, and inheritance For example: An Automobile is a class whose objects have the following attributes: year, make, model, color, and current running status Your 1997 red Chevrolet is an instance of the class that is made up of all Automobiles Objects are object-oriented components Attributes of an object represent its characteristics A class is a category of objects or a type of object An instance refers to an object based on a class Methods of classes are used to change attributes and discover values of attributes The Automobile class may have the following methods: getgas(), accelerate(), applybreaks() 7 8 Sample C# Console Application program: using System; namespace ConsoleApplication1 class HelloCSharp static void Main(string[] args) Console.WriteLine("Hello, C#"); 9 10 Include the standard namespace "System" Define a class called "HelloCSharp" Class names should use HelloCsharp and start with a CAPITAL letter. using System; Define the Main() class HelloCSharp method the program entry point static void Main() Console.WriteLine("Hello, C#"); Print a text on the console by calling the method "WriteLine" of the class "Console" using System; class HelloCSharp static void Main() Console.WriteLine("Hello, C#"); The symbol should be under the corresponding. The symbol should be alone on a new line. The block after the symbol should be indented by a TAB. 11 12 EEE-425 Programming Languages (2013) 2

System using Such formatting makes the source code unreadable. class HelloCSharp static void Main( ) Console. WriteLine ("Hello, C#" ) ;Console. WriteLine ( "Hello again" ) ; ; using brings in namespaces namespace disambiguation of names like Internet hierarchical names and C++ naming class like in C++ or Java single inheritance up to object 13 static void Main() Defines the entry point for an assembly. Four different overloads taking string arguments and returning int s. Console.WriteLine(Write) Takes a formatted string: Composite Format Indexed elements: e.g., 0 can be used multiple times only evaluated once index [,alignment][:formatting] Environment for execution of.net programs Powerful library of classes Programming model Common execution engine for many programming languages C# Visual Basic.NET Managed C++... and many others 16 Building blocks of.net Framework C# C++ VB.NET J# F# JScript Perl Delphi ASP.NET Web Forms, MVC, AJAX Mobile Internet Toolkit Windows Forms WPF Silverlight WCF and WWF (Communication and Workflow Tier) FCL ADO.NET, LINQ and XML (Data Tier) Base Class Library (BCL) Common Language Runtime (CLR) CLR Operating System (OS) 18 EEE-425 Programming Languages (2013) 3

The common classes that are used in many programs System.Console.WriteLine XML, Networking, Filesystem, Crypto, containers Can inherit from many of these classes Many languages run on.net framework C#, C++, J#, Visual Basic even have Python (see IronPython) Common Language Runtime (CLR) Managed execution environment Executes.NET applications CLR Controls the execution process Automatic memory management (garbage collection) Programming languages integration Multiple versions support for assemblies Integrated type safety and security MSIL to Native Compilers (JIT) Base Class Library Support Thread Support Type Checker Security Engine Code Manager COM Marshaler Exception Manager Debug Engine Garbage Collector (GC) Class Loader 21 From MSDN CLR is actually an implementation by Microsoft of the CLI (Common Language Infrastructure). CLI is an open specification. CLR is really a platform specific implementation. CLR via C#, Jeffrey Richter 24 EEE-425 Programming Languages (2013) 4

Framework Class Library (FCL) Provides basic functionality to developers: Console applications WPF(Windows Presentation Framework) and Silverlight rich-media applications Windows Forms GUI applications Web applications (dynamic Web sites) Web services, communication and workflow Server & desktop applications Applications for mobile devices 25 26 Visual Studio Integrated Development Environment (IDE) Development tool that helps us to: Write code Design user interface Compile code Execute / test / debug applications Browse the help Manage project's files Single tool for: Writing code in many languages (C#, VB, ) Using different technologies (Web, WPF, ) For different platforms (.NET CF, Silverlight, ) Full integration of most development activities (coding, compiling, testing, debugging, deployment, version control,...) Very easy to use! 27 28 1. File New Project... 2. Choose C# console application 3. Choose project directory and name 29 30 EEE-425 Programming Languages (2013) 5

4. Visual Studio creates some source code for you Namespace not required Some imports are not required Class name should be changed The process of compiling includes: Syntactic checks Type safety checks Translation of the source code to lower level language (MSIL) Creating of executable files (assemblies) You can start compilation by Using Build->Build Solution/Project Pressing [F6] or [Shift+Ctrl+B] 31 32 The process of running application includes: Compiling (if project not compiled) Starting the application You can run application by: Using Debug->Start menu By pressing [F5] or [Ctrl+F5] 33 34 The process of debugging application includes: Spotting an error Finding the lines of code that cause the error Fixing the code Testing to check if the error is gone and no errors are introduced Iterative and continuous process Visual Studio has built-in debugger It provides: Breakpoints Ability to trace the code execution Ability to inspect variables at runtime 35 36 EEE-425 Programming Languages (2013) 6

A computer program is a set of instructions that you write to tell a computer what to do Live Demo-Examples Procedural Programming involves creating computer memory locations, called variables, and a set of operations, called procedures. In objectoriented programming, you envision program components as objects that are similar to concrete objects in the real world The C# language was developed as an objectoriented and component-oriented language 37 38 To write a C# program that produces a line of console output, you must pass a literal string as a parameter to the Console.Out.WriteLine() method You can define a C# class or variable by using any name or identifier that begins with an underscore or a letter, that contains only letters or digits, and that is not a C# reserved keyword To create a C# program, you can use the Microsoft Visual Studio environment or any text editor After you write and save a program, you must compile the source code Program comments are nonexecuting statements that add to document a program or to disable statements As an alternative to using the command line, you can compile and write your program within the Visual Studio IDE When you need to repeatedly use a class from the same namespace, you can shorten the statements you type by using a clause that indicates a namespace where the class can be found 39 40 Questions? 1. Create console application that prints your first and last name. 2. Write a program to print the numbers 1, 101 and 1001. 3. Create a console application that prints the current date and time. 4. Create a console application that calculates and prints the square of the number 1234. 5. Write a program that prints the first 10 members of the sequence: 2, -3, 4, -5, 6, -7,... 6. Write a program to read your age from the console and print how old you will be after 10 years. 41 42 EEE-425 Programming Languages (2013) 7