Its all just code by group 8 张亚东,杨杰,甘伟,余青龙,肖春亮 chapter 2.

Slides:



Advertisements
Similar presentations
1 Chapter Five Selection and Repetition. 2 Objectives How to make decisions using the if statement How to make decisions using the if-else statement How.
Advertisements

Tutorial 12: Enhancing Excel with Visual Basic for Applications
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
C# Console Application
NAMESPACES AND VISUAL INHERITANCE. OBJECTIVES In this chapter, I will cover the following: Using namespaces Visual inheritance.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
CIS101 Introduction to Computing Week 12. Agenda Your questions Solutions to practice text Final HTML/JavaScript Project Copy and paste assignment JavaScript:
How to Create a Java program CS115 Fall George Koutsogiannakis.
Loops – While, Do, For Repetition Statements Introduction to Arrays
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Introduction to a Programming Environment
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Visual Basic Chapter 1 Mr. Wangler.
Introduction to VB.NET Tonga Institute of Higher Education.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Outlines Chapter 3 –Chapter 3 – Loops & Revision –Loops while do … while – revision 1.
Visual Programming Fall 2012 – FUUAST Topic: Development environment.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Week #2 Java Programming. Enable Line Numbering in Eclipse Open Eclipse, then go to: Window -> Preferences -> General -> Editors -> Text Editors -> Check.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
CSE 131 Computer Science 1 Module 1: (basics of Java)
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
1 Chapter Eleven Handling Events. 2 Objectives Learn about delegates How to create composed delegates How to handle events How to use the built-in EventHandler.
Introduction to Exception Handling and Defensive Programming.
CPS120: Introduction to Computer Science Decision Making in Programs.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
6/3/2016 CSI Chapter 02 1 Introduction of Flow of Control There are times when you need to vary the way your program executes based on given input.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
© The McGraw-Hill Companies, 2006 Chapter 2 Selection.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
CMP-MX21: Lecture 4 Selections Steve Hordley. Overview 1. The if-else selection in JAVA 2. More useful JAVA operators 4. Other selection constructs in.
Unit 3 Day 3 FOCS – Web Design. Journal Unit #3 Entry #2 What are (all of) the required tags in a html document? (hint: it’s everything that is in sample.html)
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
Lecture 2 Conditional Statement. chcslonline.org Conditional Statements in PHP Conditional Statements are used for decision making. Different actions.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.1.
COIT29222 Structured Programming 1 COIT29222-Structured Programming Lecture Week 02  Reading: Textbook(4 th Ed.), Chapter 2 Textbook (6 th Ed.), Chapters.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 3 – Introduction to C# Programming Outline 3.1 Introduction 3.2 Simple Program: Printing a Line.
Iteration. Iteration: Review  If you wanted to display all the numbers from 1 to 1000, you wouldn’t want to do this, would you? Start display 1 display.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 4 Loops.
Introduction to Eclipse Programming with an Integrated Development Environment.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
Chad’s C++ Tutorial Demo Outline. 1. What is C++? C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for.
Working with ASP.NET Controls What is ASP.NET Using server controls in your pages Allowing users to create their own accounts Creating a login page Letting.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
CHAPTER 4 DECISIONS & LOOPS
Simple Control Structures
Advanced Programming Lecture 02: Introduction to C# Apps
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Chapter 3 – Introduction to C# Programming
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
If-Statements and If/Else Statements
Intro to Programming (in JavaScript)
Lesson 3. Controlling program flow. Loops. Methods. Arrays.
Presentation transcript:

Its all just code by group 8 张亚东,杨杰,甘伟,余青龙,肖春亮 chapter 2

IDE is a powerful tool Every time you in the IDE in modify your project or drag something, it automatically create the code. It is very good at writing sample code, or code that can be reused easily whitout requiring much customization Every time you in the IDE make some change, it will change code, this means changing contain code files. Sometimes just to change a few lines, but sometimes also can add file to projects.

Where programs come from Every program starts out as source code files The. NET Framework gives you the right tools for the job Build the program to create an executable Your program runs inside the CLR

IDE help you coding 1.Solutions browser to show you to the project everything You will be in class switch back and forth between, the easiest way is to use solution browser. It has two kinds of views: solutions view (shown in the project files) and class view (display your code is how in logic division to different category).

2.Using tabs in open files switch between Because your program scattered on multiple files, always have multiple files at the same time open. Each open files can be in code editor in his own tags pages. IDE in has not saved filename before display a the asterisk (*). 3.IDE help you write the code Intelligent inductive characteristics do one thing for you showed this line possible next completed way

4.error list help you find a compiler error When you generate your solution, any block up the compiler issues will be displayed in the IDE at the bottom of the error list window inside.

When you change things in the IDE, you’re also changing your code It’s always easier to the IDE to change your form’s Designer-generated code. But when you do, any change you make in the IDE ends up as a change to your project’s code.

Anatomy of a program Every C# program’s code is structured in exactly the same way. All programs use namespaces, classes, and methods, to make your code easier to manage.

Anatomy of a program 1.The code file starts by using the.NET Framework tools 2.C# programs are organized into classes 3.Classes contain methods that perform actions 4.A statement performs one single action

Your programs use variables to work with data 1.Declare your variables 2. Variables vary 3.You have to assign values to variables before you use them 4.A few useful types 5.C# uses familiar math symbols 6.Loops perform an action over and over again 7.Use a code snippet to write simple for loops

Your programs use variables to work with data Time to start coding The real work of any program is in its statements. But statements don’t exist in a vacuum. So let’s set the stage for digging in and getting some code written. Create a new Windows Forms Application project.

Your programs use variables to work with data Add statements to show a message Get started by double-clicking on the first button. Then add these 6 statements to the button1_Click() method. Look closely at the code, and the output it produces.

Your programs use variables to work with data If/else statements make decisions Use if/else statements to tell your program to do certain things only when the conditions you set up are (or aren't) true. A lot of if/else statements check if two things are equal. That’s when you use the==operator. That’s different from the single equal sign(=)operator, which you use to set a value.

Set up conditions and see if they’re true Use logical operators to check conditions You’re just looked at the == operator, which you use to test whether two variables are equal. There are a few other operators, too. Don’t worry about memorizing them right now—you’ll get to know them over the next few chapters: 1.The != operator works a lot like == except it’s true if the two things you’re comparing are not equal. 2.You can use > and < to compare numbers and see if one is bigger or smaller than the other. 3.The ==,!=, >, and < are called conditional operators. When you use them to test two variables or values, it’s called performing a conditional tests. 4.You can combine individual conditional tests into one long test using the && operator for AND and the || operator for OR. So to check if i equals 3 or j is less than 5, do (i==3)||(j<5).

Set up conditions and see if they’re true Set a variable and then check it’s value Here’s the code for the second button. It’s an if/else statement that checks an integer variable called x to see if it’s equal to 10.