Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: How do I go from procedural to object oriented programming?

by marinersk (Priest)
on Apr 20, 2015 at 22:48 UTC ( [id://1124078]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I go from procedural to object oriented programming?
in thread How do I go from procedural to object oriented programming?

Okay, so you need an object called movie.

So how do we do that? This is OO -- it's all about the thing. So let's back off a bit and think about what a movie is.

A bunch of these would be called movies. And that's a clue to the next step.

A cat is a type of object. A house is a type of object. A movie is a type of object. They are all objects; but they are all different. We could say that they are somewhat defined by their attributes. So we will need to declare what type of object movie will be.

In OO, we call that a Class.

So we'll create a Class called Movies, and in it, define what attributes movies have.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1124078]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-23 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found