Python Forum
Classes in general description
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Classes in general description
#1
Hi all,

I am a bit learning coding in python and trying to deep understand the classes used in programming languages. I found a (real-world) description of classes on the internet and have written it in my own words. Am I right when it describe it as follows:

Imagine your are an engineer and you are asked to make a design for a machine for a firm. As engineer you are taken your drawing tools like pencils, pens, ruler eraser etc. With your drawing tools collected you start making your design. The design has the following properties:
  • Length
  • Color
  • Material(s)

From the above description, the following assumptions have been made:
  • Machine = CLASS
  • Length, Color and Materials = INSTANCES
  • If you using the following input (Length = 5m, Color = Blue, Material = Steel), the INSTANCE ATTRIBUTES are;
    5m, Blue, Steel
  • The combination of the INSTANCE & INSTANCE ATTRIBUTES are the INSTANCE VARIABLES

With this design you can make several machines, this machine is physical and can not be touch until you give it those properties.

Please correct/supplement me if I am wrong.
Reply


Messages In This Thread
Classes in general description - by Python_User - Aug-30-2020, 03:24 PM
RE: Classes in general description - by deanhystad - Aug-30-2020, 03:59 PM
RE: Classes in general description - by Python_User - Sep-01-2020, 05:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get file description Raysz 2 625 Nov-25-2023, 03:46 PM
Last Post: Raysz
  Why is the 'meta description' html tag not translated? Melcu54 2 1,040 Oct-15-2022, 10:55 PM
Last Post: Larz60+
  What should i do, for this code to work -> description hamad 2 1,544 Nov-18-2021, 01:22 PM
Last Post: ghoul
  Using classes? Can I just use classes to structure code? muteboy 5 5,212 Nov-01-2017, 04:20 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020