Download presentation
Presentation is loading. Please wait.
1
CS313T Advanced Programming language
Computer Science department Lecture 1 : Introduction
2
Lecture Contents Course Info. Course objectives Course plan
Books and references Assessment methods and grading Course Material Visual Studio C# First program dr. Amal Khalifa, Fall 15
3
Course Objectives 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. dr. Amal Khalifa, Fall 15
4
Course prerequisite CS 111D is the course prerequisite of CS 313D.
The notions and concepts that should be known are: Objects & Classes Composition Inheritance Inheritance hierarchy Arrays and ArrayList, Arrays of objects Polymorphism Abstract classes and methods Interfaces Exception Handling dr. MH, Autumn 17
5
Course plan Lecture 1: Introduction Lecture 2: C# Language Basics (I)
Topic date Week Lecture 1: Introduction 02/09/2018 22/12/1439 1 Lecture 2: C# Language Basics (I) 09/09/2018 29/12/1439 2 Lecture 3: C# Language Basics (II) 16/09/2018 06/01/1440 3 Lecture 4: Object-Oriented Programming (I) - Classes & Objects 23/09/2018 13/01/1440 4 Lecture 5: Object-Oriented Programming (II) - Inheritance & Polymorphism 30/09/2018 20/01/1440 5 Lecture 6: Object-Oriented Programming (III) - Abstraction 07/10/2018 27/01/1440 6 Lecture 7: GUI and event handling (or revision) & Mid-term Exam 1 14/10/2018 05/02/1440 7 dr. IF, fall 18
6
Course plan Lecture 8: Collections and Non-generic collections
Topic date Week Lecture 8: Collections and Non-generic collections 21/10/2018 12/02/1440 8 Lecture 8 28/10/2018 19/02/1440 9 Lecture 9: Generics & generic Collections 04/11/2018 26/02/1440 10 Lecture 9 11/11/2018 03/03/1440 11 Lecture 10: LINQ & Mid-term Exam 2 18/11/2018 10/03/1440 12 Lecture 10 25/11/2018 17/03/2018 13 Lecture 11: Connection to databases 02/12/2018 24/03/1440 14 Lecture 11 09/12/2018 02/04/1440 15 dr. IF, fall 18
7
Books and references dr. Amal Khalifa, Fall 15
8
Assessment methods and grading This assessment can be subject of changes
First midterm week % Second midterm week % Labs and homework % Final lab test % Term project week % Final % dr. MH, Autumn17
9
Labs, assignments, Project
Lab handouts Weekly assignments Term project group work Specific ideas Evaluation criteria Individual vs. group evaluation dr. Amal Khalifa, Fall 15
10
Course material Course material: Blackboard system & blog
Activate your account!!! s, announcements, lecture notes, lab material dr. Amal Khalifa, Fall 15
11
The Visual Studio 2012 IDE enables you to write, run, test and debug C# programs quickly and conveniently. dr. Amal Khalifa, Fall 15
12
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. Now, apply programming to computers. dr. Amal Khalifa, Fall 15
13
Computer Languages A set of used to construct a program.
Symbols (punctuation), Special words or keywords (vocabulary), And rules (grammar) used to construct a program. Relate computer languages back to natural languages. Students need to appreciate the similarities between the two. Yes, computer languages are somewhat more strict about punctuation and grammar. However, students need to get rid of their fear of the difficulties with the languages. dr. Amal Khalifa, Fall 15
14
Evolution of Programming Languages
Languages differ in Size (or complexity) Readability Expressivity (or writability) "Level" closeness to instructions for the CPU dr. Amal Khalifa, Fall 15
15
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. dr. Amal Khalifa, Fall 15
16
Console application Saved in File ClassName.cs using directive
System namespace main?? Keywords case sensitive Braces Strings A using directive tells the compiler where to look for a predefined class that’s used in an app. Predefined classes are organized under namespaces—named collections of related classes. Collectively, .NET’s namespaces are referred to as the .NET Framework Class Library. The System namespace contains the predefined Console class and many other useful classes. Console apps input and output text in a console window, which in Windows XP and Windows Vista is known as the Command Prompt. @IF: C# is case sensitive—that is, uppercase and lowercase letters are distinct, so A1 and a1 are different (but both valid) identifiers @IF: A left brace {, begins the body of every class declaration. A corresponding right brace }, must end each class declaration. @IF: Class Console provides standard input/output capabilities that enable apps to read and display text in the console window fromwhich the app executes. The Console.Write- Line method displays a line of text in the console window dr. Amal Khalifa, Fall 15
17
Example 1 comments A class name is an identifier Series of letters, digits and ( _ ), cannot begin with a digit, and does not contain spaces. @IF: Class Name Convention By convention, all class names begin with a capital letter and capitalize the first letter of each word they include (e.g., SampleClassName). This convention is known as upper camel casing. A class name is an identifier—a series of characters consisting of letters, digits and underscores ( _) that does not begin with a digit and does not contain spaces. Some valid identifiers are Welcome1, identifier, _value and m_inputField1. The name 7button is not a valid identifier because it begins with a digit, and the name input field is not a valid identifier because it contains a space. dr. Amal Khalifa, Fall 15
18
Example2 Modify the code to display each word in a separate line
@IF: Displaying multiple lines with a single statement Console.WriteLine( "Welcome \n to\n C# \nProgramming!" ); backslash (\)n: \n Modify the code to display each word in a separate line dr. Amal Khalifa, Fall 15
19
Example 3 format string fixed text and format items. placeholder
@IF: Console.WriteLine( "{0}\n{1}", "Welcome to", "C# Programming!" ); calls method to display the app’s output. The method call specifies three arguments. When a method requires multiple arguments, the arguments are separated with commas (,)—this is known as a comma-separated list. @IF: format string that may consist of fixed text and format items. Fixed text: is output by WriteLine format items. Format items also may include optional formatting information the format item {0} is a placeholder for the first additional argument (because C# starts counting from 0), {1} is a placeholder for the second, and so on. The format string in line 10 specifies that WriteLine should output two arguments and that the first one should be followed by a newline character. So this example substitutes "Welcome to" for the {0} and "C# Programming!" for the {1}. dr. Amal Khalifa, Fall 15
20
Formatting text with Escape sequences
dr. Amal Khalifa, Fall 15
21
That’s all chapter 1 : pages 1 - 10 chapter 3 : 3.1, 3.2, 3.4, 3.5
dr. Amal Khalifa, Fall 15
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.