CTEC2902 Adv Programming CTEC2902 Advanced Programming in Visual Studio ( ASP.NET + VB.NET + ADO.NET) Tugrul Essendal 1.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 1.
CS0004: Introduction to Programming Select Case Statements and Selection Input.
CTEC2902 Advanced Programming in Visual Studio (ASP. NET + C#
Intermediate Visual Basic CISP 371 CRC Prof. Chapman.
1 CIS 205 Practice Test George Lamperti A word that has a predefined meaning in a C++ program and cannot be used as a variable name is known as.
Object-Oriented Application Development Using VB.NET 1 Chapter 7 Adding Responsibilities to Problem Domain Classes.
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
SQL Exercises1 Revising RDB and SQL CTEC2902 Advanced Programming.
Using Classes1 Using Existing Classes Random CTEC2902 Advanced Programming.
VB .NET Programming Fundamentals
CSI 101 Spring 2009 Review and Recap of Visual Basic Wednesday, April 29 th.
Introduction to Methods. How do we use Methods in Java? Let us start by creating one which displays “hello” on Dos Prompt.
Chapter 1 Introduction Outstanding Features About This Book 1. A novel writing style is adopted to try to attract students’ or beginning programmers’ interesting.
Microsoft Visual Basic 2008: Reloaded Fourth Edition
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
CIS 451: Using ASP.NET Objects with SQL Dr. Ralph D. Westfall February, 2009.
National Diploma Unit 4 Introduction to Software Development Data types, variables and constants.
Language Elements 1. Data Types 2 Floating Point (real) Single Precision Double Precision Decimal Fixed Point (integer) Byte Short Integer Long Numerical.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
110-G1 Motivation: Within a program, may have to perform the same computation over and over Many programs share the same computation (e.g. sorting) To.
VBScript Language. What is VBScript Based on the Visual Basic family of languages Supports object oriented features Interpreted Loosely Typed Implicitly.
IMS 3253: Subroutines 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Procedures Subroutines Parameters –By Value.
Visual Basic Programming
Functions. Built-in functions You’ve used several functions already >>> len("ATGGTCA")‏ 7 >>> abs(-6)‏ 6 >>> float("3.1415")‏ >>>
MIS 216 Exam1 Review Spring What to expect Questions like those on the home works and on the quizzes Evaluate code Create code Multiple choice and.
CSC115 Introduction to Computer Programming Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
6c – Function Procedures Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
CS – 1P Using Electronic Voting System (EVS) questioning in the Instructional Design for CS-1P.
Sanjay Johal. Introduction(1.1) In this PowerPoint I will be explaining :  The purpose of the code for each of the two given programs, e.g. to carry.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
I Power Higher Computing Software Development High Level Language Constructs.
Variables & Function Calls. Overview u Variables  Programmer Defined & Intrinsic  Data Types  Calculation issues u Using Functions  The val() function.
1 Advanced Computer Programming Lab Calculator Project.
VB for applications. Lesson Plan Fundamentals of VB VB for handling events in Access.
COMPUTER PROGRAMMING I 5.04 Apply Decision Making Structures.
CECS 5020 Computers in Education Visual Basic Variables and Constants.
CPS120: Introduction to Computer Science Variables and Constants.
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
5.02B Decision Making Structure (part 2). Compound Boolean Expressions.
While loops. Iteration We’ve seen many places where repetition is necessary in a problem. We’ve been using the for loop for that purpose For loops are.
Making Interactive Programs with Visual Basic .NET
Visual Basic Declaring Variables Dim x as Integer = 0 In the statement above, x is being declared as an Integer (whole number) and is initialised.
Lesson 4: Introduction to Control Statements 4.1 Additional Operators Extended Assignment Operators –The assignment operator can be combined with the.
Validation Controls Assist your users with providing the correct type of input for your application Assist your users with providing the correct type of.
.NET MCQs MULTIPLE CHOICE QUESTION
Use TryParse to Validate User Input
5.04 Apply Decision Making Structures
VBA - Excel VBA is Visual Basic for Applications
PL/pgSQL
Brent M. Dingle Texas A&M University Chapter 6, Sections 1 and 2
Apply Procedures to Develop Message, Input, and Dialog Boxes
Use TryParse to Validate User Input
More Selections BIS1523 – Lecture 9.
Chapter 6 Variables What is VBScript?
Data Types, Identifiers, and Expressions
Department Array in Visual Basic
Conditions and Boolean Expressions
Visual Basic Numbers Chapter 3.3 Prepared By: Deborah 1/15/2019.
SE1H421 Procedural Programming LECTURE 4 Operators & Conditionals (1)
Visual Basic Numbers Chapter 3.3 Prepared By: Deborah 7/9/2019.
8 Records 25/07/2019.
Lecture 7 – Unit 1 – Chatbots Python – For loops + Robustness
Presentation transcript:

CTEC2902 Adv Programming CTEC2902 Advanced Programming in Visual Studio ( ASP.NET + VB.NET + ADO.NET) Tugrul Essendal 1

CTEC2902 Advanced Programming The story so far… You –Studied ASP.NET + VB.NET fundamentals –Want to learn more, specifically Objects and classes Database applications Let’s carry on CTEC2902 Adv Programming2

CTEC2902 – Content Classes and Objects use … –Constants and variables (with data types) –Functions and Subs (with parameters) –Selection and loop commands Stuff you should know already Database Applications need … Objects Built-in ADO.NET classes Your own classes to be developed 3-tier structure New material CTEC2902 Adv Programming3

Is this you? CTEC2902 Adv Programming4

ActivityMarks available Phase test 120 Phase test 230 CW part 120 CW part 230 Assessment Phase tests > short, paper-based, in class Coursework > development of database application  ASP.NET + VB.NET + ADO.NET + SQL Assessments will cover year 1 and year 2 topics 5

CTEC2902 Adv Programming Review 6

Write a function procedure, named UserType, that takes one integer parameter, named Units, which represents the number of electricity units the customer has used. The function is required to... 1)Identify the customer as being either a “heavy” or “light” electricity user (electricity units greater than 500 is heavy usage) 1)Return either “Heavy” or “Light”, as appropriate, reflecting the identification of the user. Function UserType (Units As Integer) As String If Units > 500 Then Return “Heavy” Else Return “Light” End If End Sub CTEC2902 Adv Programming7

Consider the following table definition: Product (ProductNumber, Name, Cost, Description) Write a SQL command that returns the name of all those products, where the cost is between £250 and £500, inclusive. SELECT Name FROM Product WHERE Cost >= 250 AND Cost <= 500 OR SELECT Name FROM Product WHERE Cost BETWEEN 250 AND 500 CTEC2902 Adv Programming8

Default names, like TextBox3 or Form2, are not sufficiently meaningful. They give no clues to the data they hold or the functionality they offer. This makes it difficult to understand the code and relate it to the controls on the form, which, in turn, makes maintenance very difficult. Maintenance is a very expensive activity and anything that hinders maintenance should be avoided. Fundamentals Remembered Why should you never use the default names for VB controls, like TextBox1 or Label23? CTEC2902 Adv Programming9

Is there any difference between these two commands? If so, what is it? State any assumptions you make. 1.Name = “Jones” 2.Name = Jones Yes, there IS a difference Name = “Jones”The literal string constant value “Jones” is assigned to string variable Name Name = JonesThe contents of variable Jones is assigned to variable Name (It is assumed that both variables are of same type, probably string) Fundamentals Remembered CTEC2902 Adv Programming10

Which of the following are valid assignments? 1.txtName = “Jones” 2.txtName.Text = “Jones” 3.txtName.Tag = ‘Jones’ 4.txtName.Name = “Jones” 5.txtName.Text = ‘Jones’ 6.None of the above Fundamentals Remembered CTEC2902 Adv Programming11

12 Write a Boolean function with the following signature: Function InRange( TheValue As Integer, _ TheLowEnd As Integer, _ TheHighEnd As Integer) As Boolean The function should return true if the value in the first parameter is in the range defined by the other two parameters and false if not. Fundamentals Remembered Function InRange(TheValue As Integer, _ TheLowEnd As Integer, _ TheHighEnd As Integer) As Boolean Function InRange( TheValue As Integer, _ TheLowEnd As Integer, _ TheHighEnd As Integer ) As Boolean If TheValue >= TheLowEnd And TheValue <= TheHighEnd Then Return True Else Return False End If End Function CTEC2902 Adv Programming12

CTEC2415 Object-Oriented Programming Remember to revise the material you studied last year CTEC2902 Adv Programming13

CTEC2415 Object-Oriented Programming Have a successful year and Enjoy yourselves CTEC2902 Adv Programming14