Object Oriented Analysis (OOA) is the initial approach in solving a problem - designing a conceptual model as the proposed solution based on a set of requirements.
0
votes
0answers
16 views
Nested MVC issue
I am using Nested MVCs in my application and its MVCs in a MVC composition.
I have a Task which has 3 parts.
Grid/Table : Displays collection data
Charts : Displays charts for the collection data
...
1
vote
3answers
93 views
Java OOP concept
public class MyClass {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
From the above, if we say that MyClass is the class and public static void ...
0
votes
1answer
17 views
Module loading issue in Ruby
I'm fairly new to Ruby so bare with me if I'm just doing something foolish. I have a situation where I can access a module's functions from one file but not another. These files are both in the same ...
-3
votes
0answers
45 views
Free Code Review for Object-oriented Brain model in Java? [closed]
Hey guys so I've programmed a object-oriented brain model in Java and I was wondering if anyone with a lot of experience is willing to do a free code review for me. You can check out all the code @ ...
1
vote
1answer
40 views
difference between state chart,state machine diagrams and state transition diagrams
what are the differences between state chart diagrams, state machine diagrams and state transition diagrams?
while at several places i got to learn that state chart diagrams and state machine diagrams ...
0
votes
1answer
28 views
New to Object Oriented Design
I am new to object oriented design. I am looking forward to some tips on how to model the below mentioned requirement using objects.
Requirement: A program has many Students. A program logs in to the ...
1
vote
1answer
40 views
Object-Oriented Design - Specialization: Inheritance vs. Attributes
I usually come across some design problems in which I have the choice to either specialize a class by inheriting it by a sub class, or specialize the class by defining an attribute for it that ...
-1
votes
2answers
43 views
Java Requesting Double
If in my program im using scanner.NextDouble() and the user enters something that is not a double ie a char of any kind, how can i re-promt them to enter a valid double? I tried throwing an exception ...
2
votes
2answers
74 views
Scala put method in trait or in case class?
There are two ways of defining a method for two different classes inheriting the same trait in scala.
sealed trait Z { def minus: String }
case class A() extends Z { def minus = "a" }
case class B() ...
0
votes
3answers
39 views
How to decide whether is-a or instanceof relationship is suitable in a given situation?
OK, this has happened to me many times now so I might as well ask the community. I often have a problem deciding whether declaring something as an instance or as an is-a inheritance (and declaring an ...
0
votes
3answers
53 views
How to specify children classes to use their type?
Lets say I have a class such as this:
public abstract class Foo
{
public void Access(Foo foo)
{
/*
if (foo is same type as implemented)
...
3
votes
5answers
151 views
Implementing set of “foos” which has a subset of “bars” in C#
I am writing a server to handle different types of messages from client to host. The messages are of varying content and length and will be preceded by an identifier to identify what type the message ...
0
votes
0answers
21 views
Object Oriented Analysis Tool, Hierarchy of classes by members
I am looking for a tool or set of tools, that generate hierarchy of classes by members for documentation and to understand the big picture of project. for example for the classes :
Class A;
Class B; ...
0
votes
0answers
32 views
Loop Bound Q.**********
its a simple concept i just can't wrap my head around. I have the formal definition
Loop bound: is a value that controls how many times a loop is repeated.
my question is, is that just what ever ...
0
votes
1answer
25 views
Commentaries Interface
A java interface should have any commentaries or just the class that implements this interface or both?
Example:
public interface Book{
/**
* Commentaries should be here?
*/
...
0
votes
1answer
34 views
Passing Data Between abstract classes
I'm looking for opinions on the best OO way to accomplish what I am about to describe. I'm writing what is going to become an event system for games and the like and I want it to be as extensible as ...
0
votes
1answer
40 views
OO Design Decision: Class build itself from Database or have builder class / factory
I'm building a new application and can't decide which way to go on this question.
Should the database data oriented classes build themselves from the database with methods like:
class Foo
{
...
4
votes
2answers
98 views
If Address inherits from PhoneNumber, what OOP principle(s) does it violate?
There was a book that talks about have a PhoneNumber class, and then we would define an Address class that inherits from PhoneNumber, and I said at one time, that we can't do that, because an address ...
0
votes
1answer
36 views
How do I to access a context label in encapsulating classes in Python?
I'm trying to have an encapsulated class grab context, like a label, from the encapsulating class. One way to do that is to pass the label around, like during instantiation as I show below.
I've ...
0
votes
3answers
55 views
Java OO concept better when flatten or include unnecessary process to simplify the usage?
Say, I hava Json parser class for type DataObject as following:
class JsonDataParser{
public DataObject parseData(String data){
// Parse data
return dataObject;
}
}
Now I have to ...
1
vote
1answer
40 views
Object Oriented Design Suggestion required
I need some suggestion on OOD. Below is my situation.
Class A{
private B service_;
private StopWatch timer_;
private Const int MinTimeToWait;
public SomeOperation(){
...
1
vote
2answers
122 views
object oriented design: using method parameters vs properties
in object oriented design, Which of the following is better?
sending parameters with method like :
obj.InsertRecord("raed","1987")
or using properties like :
obj.name= "raed"
obj.year= "1987"
...
1
vote
1answer
56 views
Is there a way to create temporary namespaces and constants in Ruby?
I have a class:
class MyClass
def self.say_hello
puts "hello"
end
end
and I want to create a process to override the class and its method temporarily:
begin "a temporary namespace, ...
2
votes
1answer
493 views
Building business logic on top of entity framework 5 POCOs
I've got an ADO.NET background and its the first time I've used Entity Framework in a serious project so I've gone ahead and got VS2012 and am using .NET 4.5 and entity framework 5.
I'm taking the ...
2
votes
2answers
193 views
Object oriented design principle Abstraction
While reading about abstraction, I came across the following statement
"Abstraction captures only those details about an object that are relevant to the current perspective"
For eg.
From the ...
-1
votes
2answers
367 views
How would you design class structure for a building, floors and space- Object-Oriented [closed]
What would be an elegant OOP design for these requirements?
"Design class structure for a building, floors and space. The space can be an apartment, a store or an office. Include any properties, ...
-1
votes
1answer
46 views
How to design a MultipleChoiceQuestion test in MVC? [closed]
I'm working with ASP.NET MVC4, and I'm thinking about this design. My main model is the next one for the questionnaire.
public class MultipleChoiceQuestion
{
public string QuestionText { ...
5
votes
1answer
82 views
Do I need to use a BaseClass for this scenario?
Basically I have a class called Asset which holds all the information for an Asset in my system. This can get quite big (Assets have Thumbnails, Filenames, Metadata, Ratings, Comments, etc).
On my ...
1
vote
3answers
98 views
MVC - Data transformation from one model to another?
In the Model View Controller pattern where should data transformation occur?
I have a Model that stores very specific mathematical data. I need to convert that data for a physics simulator(that only ...
1
vote
1answer
39 views
Bolting on abstract behavior dependent upon the same base?
I'm hoping someone may be able to help me out with a design issue I'm dealing with. It's specifically in the game development domain, but I think it's really a broader issue that has probably been ...
0
votes
2answers
106 views
java android view structure
Just a simple maybe stupid question.
Is it ok to use multiple activities at once in an android application using an Inflater? I want to have multiple views on my screen without losing the previous ...
-1
votes
2answers
74 views
Table structure for financial app [closed]
I am writing a simple financial app for my own purposes. App is budget software.
What is the best structure for transactions and balance tracking?
What I see at the moment is a table like this:
Id, ...
0
votes
1answer
38 views
OOD for Reporting errors after handling user's request in Service Layer
I believe there are 2 types of error that can occur during a user's request.
{1}: system error (exception, fatal error, warning, notice, etc)
{2}: user control error (what the user has done ...
0
votes
1answer
183 views
Use case analysis along with requirement analysis [closed]
Can we apply use case analysis as early as requirement analysis?
0
votes
2answers
63 views
object oriented designing [closed]
i am trying to design a mini educational support subsystem. in this system we have classes such as ,admin,staff, teacher,department,course,and .... . there are relation between these classes. my ...
-1
votes
2answers
99 views
How should I objectize this data in ruby?
I have the following text to put into some Ruby objects so that I can write them into a DB to be used in a rails app. The data is some output from a wave forecast model, which shows ocean swells at a ...
1
vote
3answers
102 views
How can an object property be aware of it's parent item?
Assuming the scheme:
class ComplexProperty
{
string PropertyName {get; set;}
string Description {get; set;}
string GetParentName(); // How can this be implemented?
}
class Parent
{
...
0
votes
5answers
82 views
What is a good way to model two objects that are the same thing, but have two different functionalities?
I am looking for a good way to model a 'move' in a board game. I want to be able to ask a Player what their move is and have them respond, then be able to perform the correct actions on the board ...
0
votes
1answer
100 views
Object Oriented Design Patterns for Model Attribute Events
I'm trying to figure out the best way to encapsulate the following scenario with Object Oriented Design principles. What type of design pattern would best suit?
I've added very basic class ...
2
votes
6answers
109 views
Design Pattern - Class with general and specialized properties
I am trying to see if there is a design pattern that can solve this:
I have created an abstract class A with properties a,b and c. I have another class B that extends the class A and adds more ...
4
votes
2answers
157 views
Elegant object-oriented member access without large number of getters/mutators
In an embedded application I am working on, I frequently need to packetize data from several different objects to be sent out over a serial port. Similarly, data comes in on the serial port that needs ...
0
votes
1answer
247 views
Object oriented Design vs. Domain driven Design
Object-oriented design is well known since 20 years. Domain specific languages and domain driven design have become popular with dynamic languages such as Ruby or Python. If your domain consists ...
0
votes
2answers
236 views
Waterfall and agile approaches issue, and UML Vs rational rose
I'm stuck with these two questions and I didn't get any obvious answers. Can anyone help?
Comparison between Structural (Water Fall or classical) approach and Agile (UP-Object Oriented) approach.
...
2
votes
4answers
128 views
How to do this without using an IF condition
I have an interface that defines one method. This interface has multiple classes that implement that interface differently.
eg:
interface IJob {
void DoSomething();
}
class SomeJob : IJob{
...
2
votes
1answer
192 views
Storing meta information to class properties
I've been agaonizing about this problem for some days:
I have a class Info
public class Info
{
private int _no;
public int No
{
get
{
return _no;
}
...
0
votes
2answers
429 views
Domain driven design concepts
I'm having some trouble with a few concepts in an application I am building using domain driven design.
I have the following layers:
Application
Domain
Infrastructure
So, let's assume I have ...
0
votes
3answers
87 views
Is this OOP code fundamentally correct? [closed]
I'm currently attempting to convert our page templates into OOP, and I have a feeling that what I've come up with for the navigation class isn't quite fundamentally correct.
Do some of these methods ...
1
vote
2answers
154 views
Checking whether object has changed (preserving good class design)
I have objects called "hierarchies", basically just a list of strings, eg. [1 2 3 4]. I also have objects called FormattedHierarchies that should always keep a formatted version of the hierarchy in ...
-1
votes
2answers
160 views
Generate multiple output files starting from a single “seed” file
Good Morning everybody,
it's sometime I wonder if it is possible to do something close to what I'm gonna describe by means of Matlab:
Using an external tool (i.e. Ansys, Abaqus or other software) I ...
3
votes
3answers
92 views
Keeping data and formatting separate in object oriented design
I am creating a program where I have objects called "hierarchies", which is little more than a list of lists with strings (ArrayList<ArrayList<String>>) with appropriate getters.
The user ...