Welcome back to Software Development!

Slides:



Advertisements
Similar presentations
1 / / / /. 2 (Object) (Object) –, 10 (Class) (Class) –, –, – (Variables) [ Data member Field Attribute](, ) – (Function) [ Member function Method Operation.
Advertisements

Object Oriented Programming with Java
For(int i = 1; i
OOP Abstraction Classes Class Members: Properties & Methods Instance (object) Encapsulation Interfaces Inheritance Composition Polymorphism Using Inheritance.
Picture It Very Basic Game Picture Pepper. Original Game import java.util.Scanner; public class Game { public static void main() { Scanner scan=new Scanner(System.in);
INHERITANCE BASICS Reusability is achieved by INHERITANCE
Week 11 - Friday.  What did we talk about last time?  Object methods  Accessors  Mutators  Constructors  Defining classes.
Lecture 2 Basics of C#. Members of a Class A field is a variable of any type that is declared directly in a class. Fields are members of their containing.
ISQA 360 – July 8, 2002 Methods Dr. Sergio Davalos.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
What is a class? a class definition is a blueprint to build objects its like you use the blueprint for a house to build many houses in the same way you.
CS102--Object Oriented Programming Review 1: Chapter 1 – Chapter 7 Copyright © 2008 Xiaoyan Li.
OOPDA Review. Terminology class-A template defining state and behavior class-A template defining state and behavior object-An instance of a class object-An.
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
College Board A.P. Computer Science A Topics Program Design - Read and understand a problem's description, purpose, and goals; Apply data abstraction.
More on Classes Pepper With help from rs.html.
BPJ444: Business Programming Using Java Classes and Objects Tim McKenna
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
A class in Java is a software construct that includes fields (also called data fields or class scope variables) to provide data specification, and methods.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Java Objects and Classes. Overview n Creating objects that belong to the classes in the standard Java library n Creating your own classes.
Spring 2008 Mark Fontenot CSE 1341 Principles of Computer Science I Note Set 5.
Chapter 4 -2 part Writing Classes 5 TH EDITION Lewis & Loftus java Software Solutions Foundations of Program Design © 2007 Pearson Addison-Wesley. All.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 7: Methods & User Input.
C# Classes and Inheritance CNS 3260 C#.NET Software Development.
Designing a Card Game Solitaire--Thirteens. Game.
2-Dec-15 Inner Classes By Alguien Soy. 2 Inner classes All the classes so far have been “top level” It is possible (and useful) to define a class inside.
Computer Science 111 Fundamentals of Computer Programming I Working with our own classes.
Classes. Student class We are tasked with creating a class for objects that store data about students. We first want to consider what is needed for the.
AP Computer Science A – Healdsburg High School 1 static Keyword in Java - Static variables - Static methods.
CS1054: Lecture 11 More Sophisticated Behavior (contd..)
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Basic Class Structure. Class vs. Object class - a template for building an object –defines the instance data that the object will hold –defines instance.
Programming in Java Transitioning from Alice. Becomes not myFirstMethod but …. public static void main (String[] arg) { // code for testing classes goes.
C#.Net Software Development Version 1.0. Overview Inheritance Member Access Constructors Polymorphism (Name Hiding) Multilevel Hierarchy Virtual and VTable.
Java 5 Class Anatomy. User Defined Classes To this point we’ve been using classes that have been defined in the Java standard class library. Creating.
Static Members Static Variables & Methods SoftUni Team Technical Trainers Software University
Re-Intro to Object Oriented Programming
Introduction to Programming G50PRO University of Nottingham Unit 9 : Classes and objects Paul Tennent
Examples of Classes & Objects
AKA the birth, life, and death of variables.
Understand the Fundamentals of Classes
CSE 8A Lecture 17 Reading for next class: None (interm exam 4)
Objects as a programming concept
Encapsulation, Data Hiding and Static Data Members
Class Structure 15-Jun-18.
Introduction to Classes and Objects
Inner Classes 11/14/ Dec-04 inner_classes.ppt.
Simple Classes in C# CSCI 293 September 12, 2005.
Classes & Objects: Examples
Inner Classes 29-Nov-18.
Variables and Their scope
CSCI 3328 Object Oriented Programming in C# Chapter 9: Classes and Objects: A Deeper Look – Exercises UTPA – Fall 2012 This set of slides is revised from.
Welcome back to Software Development!
Static in Classes CSCE 121 J. Michael Moore.
The University of Texas – Pan American
Welcome back to Software Development!
Class Everything if Java is in a class. The class has a constructor that creates the object. public class ClassName private Field data (instance variables)
Simple Classes in Java CSCI 392 Classes – Part 1.
Anatomy of Inheritance
Welcome back to Software Development!
Welcome back to Software Development!
Welcome back to Software Development!
Tonga Institute of Higher Education
Welcome back to Software Development!
CIS 199 Final Review.
Class Diagram.
Welcome back to Software Development!
Operator Overloading CSCE 121 Based on Slides created by Carlos Soto.
Chapter 5 Classes.
Presentation transcript:

Welcome back to Software Development!

Class Members Do review slides Finish MenuOption method project Instances and static Create UserInput class

Class Members Methods

Class Members Methods – class algorithms

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’

Class Members Methods – class algorithms Fields The actual code that does the work – the ‘algorithm’ Fields

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use The data or information the class uses to do its job

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use The data or information the class uses to do its job Properties

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use The data or information the class uses to do its job Properties – “smart fields”

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use The data or information the class uses to do its job Properties – “smart fields” Methods that look like fields…you can use them almost like variables

Class Members Methods – class algorithms The actual code that does the work – the ‘algorithm’ Fields – class variables any method of the class can use The data or information the class uses to do its job Properties – “smart fields” Methods that look like fields…you can use them almost like variables They “protect” the class variables (fields)

Creating a class

Creating a class class nameOfClass { members of the class (fields, properties, methods) }

Creating a class class nameOfClass { members of the class (fields, properties, methods) }

Creating a class…adding fields class MyClass { private int intField; private string strField; public int MyMethod(string strInputVariable) }

Creating a class…adding fields class MyClass { private int intField; private string strField; public int MyMethod(string strInputVariable) }

Creating a class…adding fields class MyClass { private int intField; private string strField; public int MyMethod(string strInputVariable) }

Creating a class…adding fields class MyClass { private int intField; private string strField; public int MyMethod(string strInputVariable) }