Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,158,103 members, 7,835,731 topics. Date: Tuesday, 21 May 2024 at 02:02 PM |
Nairaland Forum / Science/Technology / Programming / Practical Usage Of Object Oriented Programming (454 Views)
Tutorial: Object Oriented Programming Paradigm For Beginners in Python / I Need Help In Object Oriented Programming / Object Oriented Programming (2) (3) (4)
Practical Usage Of Object Oriented Programming by Okporiaku: 8:17pm On Jun 13, 2023 |
Its been months I've been learning Kotlin, I've been stuck trying to get a hang of OOP So many types of classes is blowing my mind (abstract,sealed,data,etc) I can't find a practical usage of it in real life situations The project I'm working on is doing fine using functions (by the way I'm making use of jetpack compose), Please any senior developer or knowledgeable person who has made use of OOP should enlighten me And i also heard that JavaScript makes use of OOP (does web development use OOP too) |
Re: Practical Usage Of Object Oriented Programming by airsaylongcome: 8:29pm On Jun 13, 2023 |
Do you first understand the concepts of classes and objects? |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 8:33pm On Jun 13, 2023 |
airsaylongcome:I understand the basics but when getting deeper I'm blown away the below is the only thing i know about classes when represented in code fun main() { val human = Human(age = 18) print(miracle.check()) } class Human(val walk: String = "yes", val dance: String = "no", val age: Int) { fun check(): String { return if (age < 18) { "ineligible" } else "eligible" } } |
Re: Practical Usage Of Object Oriented Programming by Nobody: 8:36pm On Jun 13, 2023 |
It gets 100% easier when u build a project with it. Because then u don't think about all the balderdash that confuses u But how to make the project work using OOP OOP Becomes basic And the project becomes the main task 1 Like |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 8:40pm On Jun 13, 2023 |
GREATIGB0MAN: Although I don't quite get what you mean i believe in time I'll get it |
Re: Practical Usage Of Object Oriented Programming by airsaylongcome: 8:41pm On Jun 13, 2023 |
Okporiaku: How would you explain a class and an object. In simple terms, forget technical confusing language. If you can explain it using simple terms then it would be easier overcoming the mental block you are facing |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 8:50pm On Jun 13, 2023 |
airsaylongcome:I think a class defines what properties and functions/actions are associated with an object |
Re: Practical Usage Of Object Oriented Programming by qtguru(m): 8:58pm On Jun 13, 2023 |
You need to read on OOP first before entering Kotlin else you won't know when to apply interfaces and abstract, especially when Design patterns comes. It's a paradigm that guides your development, without that, it might be hard to think of your code in terms of abstraction. |
Re: Practical Usage Of Object Oriented Programming by airsaylongcome: 9:19pm On Jun 13, 2023 |
Okporiaku: So you understand the concept. Where are you finding the challenge? |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 9:24pm On Jun 13, 2023 |
airsaylongcome: I'm trying to know their applications in real life projets |
Re: Practical Usage Of Object Oriented Programming by qtguru(m): 9:25pm On Jun 13, 2023 |
Okporiaku: https://www.youtube.com/watch?v=SiBw7os-_zI |
Re: Practical Usage Of Object Oriented Programming by qtguru(m): 9:25pm On Jun 13, 2023 |
Greatigboman is right, build a project also |
Re: Practical Usage Of Object Oriented Programming by airsaylongcome: 9:31pm On Jun 13, 2023 |
Okporiaku: I don't know how to explain it to you that will not be simplistic. I worked with a team that developed a Fintech app and OOP was used extensively in managing the different financial offerings for loans and savings |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 9:43pm On Jun 13, 2023 |
airsaylongcome: Wow, i think I'm getting it It seems that its useful when someone creates an account in an app? |
Re: Practical Usage Of Object Oriented Programming by chukwuebuka65(m): 9:49pm On Jun 13, 2023 |
Okporiaku: OOP is just a way to group variables and the functions that manipulate them together. When you are building a large application you could have up to 100 or more variables and functions. You don’t want everything lying around in the global space. You could have a variable in one part of a script, and then another developer working on another part of the software could define a variable with same name thereby introducing bugs. That’s why you have access modifiers like private and public to control whether a property or method can be modified from outside the object or not. 3 Likes |
Re: Practical Usage Of Object Oriented Programming by Okporiaku: 9:55pm On Jun 13, 2023 |
chukwuebuka65:That makes sense Thanks for the input |
Re: Practical Usage Of Object Oriented Programming by tollyboy5(m): 11:49pm On Jun 13, 2023 |
i use to be in this shoes some times ago. |
Re: Practical Usage Of Object Oriented Programming by davien(m): 11:56am On Jun 14, 2023 |
Okporiaku:create a notebook app that uses classes to create objects that hold text, then map that text to the screen, I'm a JavaScript dev but this OOP project is a standard in most if not all Object Oriented Languages. |
(1) (Reply)
Do You Need Help With Your Programming Project At School / Programming Tutor For Kids / I Want A Developer For a Job
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 25 |