Object Oriented Systems - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Object Oriented Systems

Description:

Requirements (Or how to pass) Why Object Oriented Systems? ... user and therefore stopping them from messing with the insides of objects in undetermined ways ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 18
Provided by: scie205
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Systems


1
Object Oriented Systems
  • G6DOOS
  • Peter Blanchfield

2
Introduction
  • Resources
  • Requirements (Or how to pass)
  • Why Object Oriented Systems?
  • What language will we use

3
Resources
  • Any number of texts are available in the library
  • The Complete Reference C by Schildt will be
    extensively used
  • Also Used
  • Object-Oriented Programming in C
  • R Johnson Baugh and M Kalin
  • Published by Prentice Hall
  • I will use Visual C .Net in 21 Days by Chapman
    published by SAMS a lot
  • Many useful websites though as websites do they
    come and go so never reference them!

4
Requirements
  • Assessment
  • A number of course work programs worth a total of
    50
  • An unseen exam worth 50
  • Plagiarism
  • To be avoided at all costs! This involves
  • Copying from anyone else! Your work is to be
    your own. If you hand in someone elses work
    both you and they will be given 0 and your names
    will go to an academic offences committee
  • Copying code from a web site or book punishment
    the same as above.
  • Exception When you properly reference that
    source in comment lines in your source code and
    any supporting documentation. The proportion of
    such copying must be limited see below

5
Requirements Plagiarism continued
  • Anyone who does not understand this will need to
    see me.
  • If you copy from a source and quote it reference
    it correctly it will still give you 0 if you
    have used it for more than 20 of your course
    work.

6
Why Object Oriented Systems? A review? For most
of you
  • In the 70s the concept of top down programming
    emerged
  • Objective to give structure
  • Languages like C emerged structured languages
  • Meant to make things more obvious
  • Make programming clearer
  • Make updating etc easier
  • It worked to a certain extent
  • In the 80s OOS started to emerge
  • Wanted to make it easier to reuse code
  • Reasonable to connect data and functions that
    related to them
  • Languages became orientated around objects

7
Why Object Oriented Systems?
  • Objects introduce useful concepts that make the
    notions of
  • Structure
  • Reusability clearer
  • Important terms
  • Encapsulation
  • The act of associating data and its methods
  • Allows for information hiding making only the
    interface available to the user and therefore
    stopping them from messing with the insides of
    objects in undetermined ways
  • Message Passing
  • Referred to as the Client/Server model by some
  • Objects are passed messages and return
    information rather than free standing procedures
    and functions

8
Why Object Oriented Systems?
  • Inheritance
  • The idea that a parent class of objects has
    certain attributes that are inherited by its
    child classes
  • Allows reuse of recurring class attributes
    without having to redefine their existence if
    nothing special happens
  • Polymorphism
  • Allows many forms of an operation or method to
    exist thus allowing different types of data to
    use the same function name without having to
    worry that it redefines something that some other
    method or object uses
  • For example there can be one form of a method
    that deals with integers and another with the
    same name that deals with doubles
  • Operator Overloading which is a similar thing
    when done to operators (like and - )

9
Why Object Oriented Systems?
  • This all makes it easier to reuse programmes and
    to keep them working if done properly.
  • However
  • It is just as easy to make it totally impossible
    to maintain your software using OO technology as
    it is any other method in fact you could
    probably make it harder
  • Why not Object Orientated Systems
  • Because Americans have never been any good at
    English

10
What language
  • This is probably the best question here.
  • You have all done Java and it is an OO language
    so why not use it? So is C so what about that?
  • Some of you already know C! So what can we do
    that is new
  • But
  • Most of you will not be or become programmers so
    why make life harder?
  • Life will not be so much harder as C C and
    Java overlap
  • However there are significant syntactic and
    conceptual differences
  • There are things that you cannot do in Java
  • Apart from wait for the Java developers to come
    up with things that do what you want
  • For the course work we will use Visual C

11
Why C?
  • There are good reasons for using C for some
    tasks and you need to know how programming
    languages differ so
  • Its good for the soul!
  • Some of you are now more mature so
  • You will have to make accommodation for yourself
  • Dont try and memorise everything at your age
    it will not work as well as it did when you were
    undergraduates
  • Try to understand the concepts they are
    basically the same for all OO languages
  • I will try and make the things that are special
    to the C paradigm stand out so you dont forget
    not to use them in Java.

12
Hello World
  • We need to get really familiar with an IDE
  • So we will write Hello World in C using Visual
    Studio
  • Despite my personal opinions of Microsoft this is
  • One of the best IDEs around
  • I have some slides of how it works but mostly I
    will do things in class
  • I like to live dangerously

13
Starting a new project
  • Run Visual Studio 2005
  • Choose new
  • Select File New Project and choose Visual C tree

14
Starting a new Project
  • Select general
  • Select Empty Project choose a name and navigate
    to a suitable location
  • And Click OK

15
Entering and Compiling Hello World
  • Choose Project Add New Item
  • Choose C File and enter the appropriate name

16
Hello World
  • Enter the program then choose Build, Build the
    Solution

17
Hello World
  • If you have entered it correctly it should
    compile with no errors
  • Now run it by choosing Debug start without
    debugging or ctrl F5
Write a Comment
User Comments (0)
About PowerShow.com