What is an Object Anyway?

Slides:



Advertisements
Similar presentations
Driving Test 1 Marking Scheme Focus on five areas to pass driving test 1.
Advertisements

IMAT1604 Visual Web Development. What is an Object Anyway? What is a word? Think about the following word… Shop What springs to mind?
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
Basics of Computer Programming Web Design Section 8-1.
CS100J 11 September 2003 Course Management System for CS100J is now populated with students who were pre-registered. Look at course web page to see how.
CS 61C L02 Number Representation (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
Python Programming Chapter 2: Variables, expressions, and statements Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
Group practice in problem design and problem solving
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
A First Program Using C#
PHP : Hypertext Preprocessor
Introduction to Python
Rote Learning of the Week "A variable is a named section of RAM that stores data of a specific data type"
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
PHP meets MySQL.
Section 2 Variables National 4/5 Scratch Course. What you should know after this lesson What a variable is Where variables are stored How to get data.
How Computers Work … and how you can work them. Art 315 Lecture 03 Dr. J Parker Fall 2010.
A Level Computing#BristolMet Session Objectives#U2 S7 MUST understand the difference between an array and record SHOULD be able to estimate the size of.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
What is data? Chapter 1. Introduction This presentation covers the following: – What is data? – What is information? – Representing data – What is knowledge?
Variables and Math in Code. Variables A variable is a storage block for information in your program “A” “A” Computer Program Memory Computer Program.
Objects Methods and Instantiation. Programming Programming is the act of writing instructions that tell a computer how to do something. This module is.
Programming 101 EPGY Middle School Programming Adam Leeper.
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Review of HTML and CSS A (very) brief review of some key fundamentals to be aware of in IT-238.
Tutorial 11 1 JavaScript Operators and Expressions.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
IMAT1604 Visual Web Development. About me… Matthew Dean (Or Google mjdean dmu)
Objects Allow us to represent and control the computer technology Use methods to make the object do something Use properties to find out and change the.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Foundations of Programming: Java
By Melissa Dalis Professor Susan Rodger Duke University June 2011
Math operations 9/19/16.
More about comments Review Single Line Comments The # sign is for comments. A comment is a line of text that Python won’t try to run as code. Its just.
Introduction to Python
Lesson Objectives Aims
Web Design II Flat Rock Community Schools
IGCSE 6 Cambridge Effectiveness of algorithms Computer Science
Variables Data Types and Assignment
PDO Database Connections
Using Procedures and Exception Handling
TRANSLATORS AND IDEs Key Revision Points.
IPC144 Introduction to Programming Using C Week 2 – Lesson 1
Variables and Arithmetic Operations
Learning to Program in Python
Introduction to the C Language
Unit 2 Programming.
Lesson 4: Controlling Memory with Variables
Fill the screen challenge!
PDO Database Connections
PDO Database Connections
Key Applications Module Lesson 12 — Word Essentials
Monday 12/3/18 Copy this week’s schedule into your assignment notebook. Bell Ringer: In the image on the left what do you think the person was doing.
ICT Programming Lesson 1:
Subprograms Parameters.
Variables Data Types and Assignment
Functions, Return Values, Parameters Getters and Setters
Assignment #2 – 10/3/2010 – Submit on 17/3/2010
Key Applications Module Lesson 12 — Word Essentials
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Variables Data Types and Assignment
Hardware is… Software is…
Presentation transcript:

What is an Object Anyway? IMAT1604 Visual Web Development

Stuff to memorise this Week "A function is a named section of code that does one thing well"

What is an Object Anyway? What is a word? Think about the following word… Shop What springs to mind? A Specific Shop? The act of shopping?

Creating Instructions A word on its own isn’t much use to us however when we combine it with other words we can create instructions. “I want you to go to the shop and get me a tin of peas.”

Words are Really Just Symbols What is this?

What if we add other symbols? Traffic lights and words on a page are all the same they are all symbols that we look at and assign meaning.

What is Programming? Programming is about using words and symbols to communicate with a Computer As with our example above we use words / symbols to create instructions or functions that the computer will follow and perform some task. Functions are organised into classes – text files

Harry Potter What makes Hermione Granger so irritating? Why is Ron Weasley more relatable? We need to use the right words correctly

Fight or Flight? Lots of errors Not sure about the tutor Class at inconvenient time Not getting it The importance of determination

The Importance of Vocabulary “Shop, street, road, post box, lamp post, post code, house, flat, house number, left, right ahead, distance, time, street sign, landmark.” These words make up the vocabulary of the streets and roads. We are familiar with these words and can easily make up instructions (functions) using these words. “You want to walk down that street for 10 meters then turn left at the post box. You will then see a sign to the railway station. Follow that sign for 5 meters and the shop is on the left.”

Computer Programming Introduces a new Vocabulary “Class, object, assignment, sequence, variable, RAM, parameter, data type, function, method, property, selection, sequence, integer, string.”

The Computer Programmer The person who knows how to write the correct words / symbols to tell the computer what to do Computers copy and process data Data is made of binary numbers Nobody really likes binary We need a set of commands to control data

First Look at Some C# Code What is wrong with this?

The Problem Computers are really fussy Spotting errors can be difficult at first This gets easier with practice Take a look at the following… Int32 Name; - Variable Name(); - Function “Name” - A string of letters .Name - A method or a property (Probably a property) //Name - A comment (Name) - A parameter

New Terms to Understand Function Method Property Class Instantiation Object

Functions “A function is a named section of code that does one thing well.”

Functions are building blocks in programming Functions are used to make Methods Properties Unit tests Event handlers Constructors (Like bread makes toast!)

Methods and Properties Tells the object to perform an action E.g. Multiply Property Allows us to get or change the settings of an object E.g. Count (This will be confusing at first!)

Classes A class is a text file that contains related functions making them easier to manage Classes are like recipe books Recipe books dedicated to specific regions Classes dedicated to specific sets of functionality A student manager class might contain… Methods .AddStudent .UpdateStudent .DeleteStudent Properties .Count .HighestStudentGrade

So what is an Object Anyway? An object is the name we give to a class file so that we may access its methods and properties The object in this code is MyStudents Made up by the programmer Associates the word with the class file clsStudents Allowing us to access the function/method AddStudent

Instantiation Stuff in green called comments Create an object MyCompter referencing the code in the class file clsComputer Invokes the function/method TurnOff Instantiation is the act of creating an object from a class.

Summary Programming is about using words and symbols to communicate with a Computer We need a system for writing lists of instruction for the computer that makes reasonable sense to human beings   We also have some key words for you to start getting to grips with… Function A function is a named section of code that does one thing well Property a property allows us to read or change the settings of an object Method A method tells an object to perform an action Class A class file is a text file that stores functions for a specific task Object An object is the name we give to a class file so that we may access its methods and properties Instantiation Instantiation is the act of creating an object from a class