cs313d: advanced programming languageimplement and modify c# programs based on object-oriented...

26
CS313D: ADVANCED PROGRAMMING LANGUAGE Lecture 1 : Introduction Computer Science department

Upload: others

Post on 08-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

CS313D: ADVANCED

PROGRAMMING LANGUAGE

Lecture 1 : Introduction Computer Science

department

Page 2: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Lecture Contents

dr. Amal Khalifa, Spring17

Course Info.

Course objectives

Course plan

Books and references

Assessment methods and grading

Course Material

Visual Studio

C# First program

2

Page 3: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Instructor

dr. Amal Khalifa, Spring17

3

Page 4: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Course Objectives

dr. Amal Khalifa, Spring17

4

By the end of this course the students will be able to:

Implement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers, and exception handling.

Develop windows applications using the .NET programming environment.

Use the ADO.NET Entity Data Model to establish connections with and manage Transactions of Databases.

Page 5: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Course plan

dr. Amal Khalifa, Spring17

5

Page 6: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Books and references

dr. Amal Khalifa, Spring17

6

Page 7: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Assessment methods and grading

dr. Amal Khalifa, Spring17

7

Page 8: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Labs, assignments, Project

dr. Amal Khalifa, Spring17

8

Lab handouts

Weekly assignments

Term project

group work

Specific ideas

Evaluation criteria

Individual vs. group evaluation

Page 9: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Course material

Course material:

Blackboard system & blog

Activate your account!!!

emails, announcements, lecture notes, lab material

9

dr. Amal Khalifa, Spring17

Page 10: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

dr. Amal Khalifa, Spring17

10

The Visual Studio 2012 IDE enables you to write,

run, test and debug C# programs quickly and

conveniently.

http://www.visualstudio.com/

Page 11: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

dr. Amal Khalifa, Spring17

11

What is Computer Programming?

Planning or scheduling a sequence of steps for a

computer to follow to perform a task.

Basically, telling a computer what to do and how to

do it.

A program:

A sequence of steps to be performed by a computer.

Expressed in a computer language.

Page 12: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

dr. Amal Khalifa, Spring17

12

Computer Languages

A set of

Symbols (punctuation),

Special words or keywords (vocabulary),

And rules (grammar)

used to construct a program.

Page 13: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Evolution of Programming Languages

dr. Amal Khalifa, Spring17

13

Languages differ in

Size (or complexity)

Readability

Expressivity (or writability)

"Level"

closeness to instructions for the CPU

Page 14: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

dr. Amal Khalifa, Spring17

14

High-Level Languages

Closer to natural language

Each step maps to several

machine language instructions

Compiler: A program that

translates a program written

in a high-level language into

the equivalent machine

language.

Page 15: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Console application

dr. Amal Khalifa, Spring17

15

Saved in File ClassName.cs

using directive

System namespace

main??

Keywords

case sensitive

Braces

Strings

Page 16: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Example 1

dr. Amal Khalifa, Spring17

16

comments

A class name

is an

identifier

Series of

letters, digits

and ( _ ),

cannot begin

with a digit,

and does not

contain

spaces.

Page 17: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Example2

dr. Amal Khalifa, Spring17

17

Modify the code to display each word in a separate line

Page 18: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Example 3

dr. Amal Khalifa, Spring17

18

format string

fixed text

and format

items.

placeholder

Page 19: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Formatting text with Escape sequences

dr. Amal Khalifa, Spring17

19

Page 20: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

chapter 1 : pages 1 - 10

chapter 3 : 3.1, 3.2, 3.4, 3.5

That’s all

dr. Amal Khalifa, Spring17

20

Page 21: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Case Studies 21

dr. Amal Khalifa, Spring17

Page 22: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Q1:

dr. Amal Khalifa, Spring17

22

Page 23: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Q2:

dr. Amal Khalifa, Spring17

23

Page 24: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Q4:

dr. Amal Khalifa, Spring17

24

Page 25: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Q5:

dr. Amal Khalifa, Spring17

25

Page 26: CS313D: ADVANCED PROGRAMMING LANGUAGEImplement and modify C# programs based on object-oriented programming concepts such as classes, inheritance, polymorphism, overloading, indexers,

Q6:

dr. Amal Khalifa, Spring17

26