introduction to programming · beginning.c.sharp.4.0.an.introduction internet materials grading :...
TRANSCRIPT
10/1/2018
EEE-425 Programming Languages (2013) 1
Creating and Running Your C# Program
What we do during this course
Requirements
What is a programming language?
Simple C#
3
: http://eembdersler.wordpress.com◦ Choose the EEE-425Programming Languages (Fall)
Textbook reading schedule
Pdf lecture notes
Updated class syllabus
Midterm and final exams grades
Answers of Midterm and Final Exam
4
Texts and Other Course Materials◦ Programming C#, 4th Edition - Jesse Liberty (You may down this
version the book from Internet - It is your responsibility to download it or buy the book from http://www.amazon.com/Programming-C-Jesse-Liberty/dp/B00006AVR5)
◦ Beginning.C.Sharp.4.0.An.Introduction◦ Internet Materials
Grading :◦ Assignments 20%◦ Midterm 20%
◦ Final : 20%◦ Project : 40% ( Presentation, code and short report)◦ Bonus : 10% ( If you follow all course –no exception, you will get◦ extra 10% of your grade)
Total 110%
5
This course contains material that
demands intense mental work and an
unusual amount of time commitment.
Student dedication is advised.
6
10/1/2018
EEE-425 Programming Languages (2013) 2
7
Instructor’s expectations:◦ Homework. Read chapters prior to class from the
textbook◦ Expect 2-4 hours outside classroom activities; Reading◦ Participate. Ask questions. Contribute. Actively
participate in the exercises. Consider the classroom to be a mental gymnasium where it’s ok to run, fall, and get up again
◦ Take notes. Why let any idea get away? Taking notes will help you concentrate and organize your
thoughts Notes allow you to take a refresher any time in the future.
◦ Enjoy yourself. Start relaxed and you’ll leave refreshed, inspired, and recharged Forget about what’s happening at home or at work This is your time. Get all you can out of this course and have
a good time◦ Excessive Late assignments: will not accepted
8
Refer to the syllabus for details regarding◦ Academic dishonesty
NOCHEATHING is allowed for all materials.
Given and taken person will be punished with less notes( 0)
◦ Attendance : 70% of Lectures
◦ Special attention for the class
Covers (most of) the C# language and some of the most useful .NET API’s.
Should not be your first programming class.◦ Assume you know C++ and basic object-oriented
programming.
Requires (lots of) practice / reading.◦ C# and .NET cannot be learned thoroughly in this
brief course.
9
Require◦ do all assignments
Assignments are ◦ You will not be given a detailed grade◦ Show me that you understand the concepts, and can
write C# code Do a project that related with technical EEE by using C#
( It is important to apply your knowledge to oneproblem-Database projects are NOT accepted)
Note : Pls dont just directly copy the code from Internet or somewhere as your project- If we know that is copiedsomewhere we will penalty its grade as 0 (zero)
10
To do well in this class, you have to
work really hard.
You need to be prepared to dedicate a
significant amount of time and
mental effort on this class.
11
We hope, everybody has own laptop computer for this course.
You need to bring your laptop computer to every class.
Install Microsoft Visual Studio, if needs(The version of VS is not a big issue, you can install one of old version, as long as it works properly)
If you don’t have your laptop with you, you don’t need to attend the class.
12
10/1/2018
EEE-425 Programming Languages (2013) 3
13
Computer programming: creating a sequence of instructions to enable the computer to do something
14
Programmers do not use machine language when creating computer programs. Instead, programmers tend to use high-level programming languagesEach 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
Plan your solution◦ Find suitable algorithm to solve it
◦ Find suitable data structures to use
Write code
Fix program error (bugs)
Make your customer happy
15
= Specification
= Design
= Implementation
= Testing & Debugging
= Deployment
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 ManufacturersAssociation) standardized.
16
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
17 18
10/1/2018
EEE-425 Programming Languages (2013) 4
Sample C# Console Application program:
using System;
namespace ConsoleApplication;class HelloCSharp{
static void Main(string[] args){
Console.WriteLine("Hello, C#");}
}
19 20
using System;
class HelloCSharp{
static void Main(){
Console.WriteLine("Hello, C#");}
}
Include the standard
namespace "System"
Define a class called
"HelloCSharp"
Define the Main() method – the
program entry point
Print a text on the console by
calling the method "WriteLine" of the class "Console"
21
using System;
class HelloCSharp{
static void Main(){
Console.WriteLine("Hello, C#");}
}
The { symbol should be alone on a new line.
The block after the {symbol should be
indented by a TAB.The } symbol should
be under the
corresponding {.
Class names should useHelloCsharp
and start with a CAPITAL letter.
22
using System
;
class HelloCSharp {static
void Main( ) { Console. WriteLine ("Hello, C#" ) ;Console.
WriteLine ( "Hello again") ;}}
Such formatting makes the source code
unreadable.
Study your EEE-117 material to understand C# faster, because we don’t repeat common points of C++ and C#
Will ask you about C++ at the classroom and grade you.
23
These slides ae modified and copied from different slides especially from
Telerik.com
Prof. Roger Crawfis◦ http://www.cse.ohio-
state.edu/~crawfis/cse459_CSharp/index.html◦ Pls listen the podcast about the chapter 2◦ These slides are changed and modified
Programming C#, 4th Edition - Jesse Liberty –Chapter 2
24