Questions tagged [object-oriented]
Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.
428 questions
57
votes
2
answers
60k
views
Class for reducing development time
There are many PHP PDO classes out there, agreed. However I find they do not allow for flexibility. So I created one that helps reduce development time as little as it may be but it does the job (...
29
votes
1
answer
6k
views
Extensible logging
Whenever I need logging functionality in .net, I use a logging framework, such as NLog. Obviously there's no logging framework for vba, at least none that I know of.
As much as I love using NLog, the ...
14
votes
1
answer
3k
views
VBA Class to persist and restore Excel Application properties
Very often on Stack Overflow, and even on Code Review, I've seen questions and answers that have code that begins by persisting Excel properties like DisplayAlerts ...
12
votes
3
answers
6k
views
WinForms dice roller
I am writing a dice roller winforms application using C# 2012 VS. Dice roller is set up for playing Shadowrun tabletop. I feel that there might be too much code going into the GUI, but I am unsure ...
9
votes
1
answer
1k
views
Critique Request: PHP Request-Method Class
I'm working on a general Requestmethod class which sanitizes and recasts the input of users in an automatic fashion. I've also tried to do array-access in cookies.
...
7
votes
1
answer
2k
views
OOP-style FizzBuzz program in PHP
I've tried to write a configurable OOP-style FizzBuzz program in PHP for learning purposes. I hope everything is quite easy to understand.
What do you think of the overall architecture?
Are OOP ...
43
votes
5
answers
41k
views
Designing a coffee machine
I was recently rejected from what looked like a really promising string of interviews. I did very well in a questionnaire style review, and then they handed me this assignment (more or less):
Design ...
26
votes
3
answers
3k
views
Simple object-oriented calculator
After studying several ways of doing OOP in JavaScript I think I finally came up with one that seems OK to me. Is it okay? Do you see some problems I can face by using OOP in JavaScript like this?
...
19
votes
2
answers
4k
views
Down the rabbit hole with MVP
Following-up on this post where I implemented a Repository Pattern in vba to abstract ADODB and enable testing my Excel app without hitting a database backend; curious about how far vba would let me ...
15
votes
2
answers
916
views
Finding the cheapest hotel
I thought this question made a good excuse for some basic OOP code, so I whipped up a little bit of code to demonstrate it in VBA; the idea is to have tutorial-grade code, to show how interfaces and ...
10
votes
2
answers
1k
views
Basic Imitation of C# Enumerable in VBA - or any other static class
Since implementing static classes in VBA actually seems possible I came up with an idea to try to imitate C#' Enumerable class (well, to some extent...). This is ...
10
votes
5
answers
18k
views
Casting base to derived class according to a type flag
I have been writing an event class for my game engine and I came across to the following problem:
Is casting a base class object to a derived class object given a type flag a good programming design?
...
8
votes
2
answers
1k
views
Selection Sort Algorithm (Python)
Selection Sort
The selection sort algorithm sorts a list by finding the minimum
element from the right unsorted part of the list and putting it at the
left sorted part of the list. The algorithm ...
7
votes
2
answers
491
views
Simple object-oriented calculator - follow-up
This question is an improvement I did based on recommendations from this other question: Simple object-oriented calculator
JSFiddle
...
2
votes
1
answer
678
views
Printing results in XML
I have been writing PHP programs in the MVC pattern for quite some time. But I am not sure if I am doing it right.
For instance, I have this PHP file that prints results in XML, and I put this file ...