Presentation is loading. Please wait.

Presentation is loading. Please wait.

May 1, 2015 1 CS2126 Application Programming: An Actual Progress Sheldon X. Liang Ph. D. Montana Tech of UM, Butte MT 59701, Tel: 406-496-4366 Department.

Similar presentations


Presentation on theme: "May 1, 2015 1 CS2126 Application Programming: An Actual Progress Sheldon X. Liang Ph. D. Montana Tech of UM, Butte MT 59701, Tel: 406-496-4366 Department."— Presentation transcript:

1 May 1, CS2126 Application Programming: An Actual Progress Sheldon X. Liang Ph. D. Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ May 1, 2015 Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

2 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ A silent night … … Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

3 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ A silent night … … Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

4 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ In the beginning, our project is formless … We’re planning GUI form first Then we deign interface form, plan properties and Basic code … Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

5 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ After we got GUI form, programming … Now we define interface, set properties and write Basic code … Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress We’re programming Project

6 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ What’s needed to bridge the gap between… Planning Programming VISION is our Golden Gate Bridge Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

7 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/  Form Planning vs. Programming  Blank-filling under Framework  Declaration vs. Scope & Lifetime  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function) CS2126 Application Programming An Actual Progress Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

8 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Two kinds of structures (seq / sel)  Four kinds of controls  Three kinds of data  One kernel in mind: you do less but re-use

9 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Controller controls  Four kinds of controls appearing on Forms  Mute controls  Controlled controls  Contributor controls They will do nothing dynamically, just display information. You do not need to consider them anymore in programming. They not only do a lot of things, but also stimulate other controls to react. You need to give careful consideration in coding They are passively affected by other controls and provide main showcase for calculation. You need to put data for display They are happy to join others’ calculation by contributing their data. You need to pick data from them for calculation

10 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Controller  Four kinds of controls appearing on Forms  Mute  Controlled  Contributor Group Box and Most Labels It only needs its “.Text” property, never needs a ”.Name” property, that is to say, you even do not need to give a name to it. In your code, you won’t do anything.

11 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Four kinds of controls appearing on Forms Most Buttons It needs not only its “.Text” property, but also a serious “.Name” property, this is because some auto-generated code is strongly tied up with it. Double-click will start your programming.    Mute  Controlled  Contributor  Controller

12 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Four kinds of controls appearing on Forms  Double Click to start Your serious name should be: orderBtn 

13 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Four kinds of controls appearing on Forms Some Labels and TextBoxes It usually has an empty “.Text” property. It needs a serious “.Name” property, and a variable for storing datum. Finally it is required to put datum back. i.e., totalLabel (name), totalDecimal (variable) totalLable.Text = totalDecimal.toString()  Mute  Controlled  Contributor  Controller

14 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Four kinds of controls appearing on Forms Text Box, Radio and Check Box It usually has an companied “.Text” property. It needs a serious “.Name” property, variable (or constant) related to it. Generally it just contribute something for calculation, i.e., quantityTextBox (name), quantityInteger (variable) quantityInteger = Integer.Parse (quantityTextBox.Text)  Mute  Controlled  Contributor  Controller

15 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Inner Identifier .Name property  Three kinds of data  Appearance .Text property  Variable/Const  store data at run time This property is for users to look at while using the form, so brief, exact, and precise TEXT will be good for them. i.e., Order Coffee, Clear, Exit This property is for designers to identify controls while design form and programming, so easy to remember will be great. i.e., quantityTextBox (or quantityTB), totalLabel (or totalLB) This is for data storage in calculation, pickup and conversion, so data type postfix to the variable will be good for programmers. i.e., quantityInteger, totalDecimal, taxDecimal, TAX_RATE_Decimal

16 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Inner Identifier  Three kinds of data  Appearance  Variable/Const All information appearing on the form Their purpose appearing on the form is to prompt users to know the meaning, so that they are guided to further operation. i.e.,.Text properties  Bill Form, Coffee Selection, Cappuccino, Espresso, Latte, Iced Latte, Iced Cappuccino, Your Order, Quantity, takeout, Discount15%, Oder, Total Tax, Discount, Total Due, Enjoy yourself (Clear)

17 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Inner Identifier  Three kinds of data  Appearance  Variable/Const Every control has an inner identifier Their purpose is to let form designer and programmer use their various properties through the.Name, but for mute controls, just take the default one. cappuccinoRadioButton espressoRadioButton quantityTextBox orderButton quantityTextBox

18 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Project Planning vs. Programming  Inner Identifier  Three kinds of data  Appearance  Variable/Const Contributor & Controlled controls need variables to hold data Their purpose is to let programmer hold data for calculation, conversion, and other use quantityInteger totalDecimal taxDecimal discountDecimal totalDueDecimal

19 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/  Form Planning vs. Programming  Blank-filling under Framework  Declaration vs. Scope & Lifetime  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function) CS2126 Application Programming An Actual Progress Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

20 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Blank-filling under framework  A Perfect VISION Form Math description

21 Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Blank-filling under framework  A Perfect VISION Form

22 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/  Form Planning vs. Programming  Blank-filling under Framework  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function)  Declaration vs. Scope & Lifetime CS2126 Application Programming An Actual Progress Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress

23 Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Incremental Building Blocks  Simple Form and Brief Operation Simple Form  Menu Window and Integrated Forms  Father Window and Common Dialog Box

24 Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress  Declaration vs. Scope & Lifetime  Variable Scope  accessible privilege  Variable lifetime  live an actual life

25 May 1, Montana Tech of UM, Butte MT 59701, Tel: Department of Computer Science, mtech.edu/cs/ That is all Thank you very much! Questions? Computer Science and Software Engineering CS2126 Application Programming: An Actual Progress


Download ppt "May 1, 2015 1 CS2126 Application Programming: An Actual Progress Sheldon X. Liang Ph. D. Montana Tech of UM, Butte MT 59701, Tel: 406-496-4366 Department."

Similar presentations


Ads by Google