1 - Intro.ppt

advertisement
Advanced Computer
Programming
1
Overview
Coding
C#
.Net Framework
C# - C++ -Java

2
Programming
Problem determination
Analysis
Algorithm
Writing code
Testing

3
Problem Determination
Define what to do
Field investigation
Other arguments

4
Analysis



Program inputs and outputs
Variables that are going to be in the
program
Data flow within the program
5
Algorithm


Defines how to do a job
Automates jobs
6
Coding



Converting the algorithm to a
programming language
Realization of the program
Fixing coding errors and bugs
7
Testing



Checking whether program produces
expected outputs to given inputs.
Fixing logical errors
Step-by-step investigation of program
execution with using a special program
“Debugger”
8
Example
Make an Omelet
9
Problem determination



Determine the phases to make an
omelet.
What kind of problems that we may
encounter.
What kind of help could we get.
10
Analysis

Inputs


Egg, oil, salt, spices.
Variables

Oven, pan, fork, plate
11
Algorithm








Turn on oven
Put the pan to the oven
Pour some oil to the pan
Break eggs in to the pan
Add salt
Mix
Add spices
Mix
12
Coding
13
C# (C Sharp)





Object oriented
Visual Studio 2015
.Net Framework
.Net Compact Framework
.Net Micro Framework
14
C# - C++ - Java
C is the ancestor language
Different purposes
Different platforms
Similar notations
Competition

15
C# - C++ - Java
Defining variables
For Loop
C++:
C++:
int x = 0;
C# :
int x = 0;
Java :
int x = 0;
for(int i = 0;i<10;i++)
printf(“%d”,i);
C# :
for(int i = 0;i<10;i++)
console.WriteLine(“{0}”,i);
Java :
for(int i = 0;i<10;i++)
system.out.println(i);
if-else
C++:
if(nCount<Max)
nCount++;
else
total += nCount;
C# :
if(nCount<Max)
nCount++;
else
total += nCount;
Java :
if(nCount<Max)
nCount++;
else
total += nCount;
16
Download