Skip to main content

All Questions

3 votes
4 answers
1k views

Representing vectors as arrays of points vs. as data structures

I'm writing a program in Java where I need to represent the position, scale, and other 3-dimensional properties of objects in a world using vectors. I can use either of these two approaches: ...
Bunabyte's user avatar
  • 643
-1 votes
3 answers
293 views

Design pattern for creating and scheduling tests/exams

I have an Exam class that represents an examination/test: public class Exam { public int Id { get; set; } [Required] [StringLength(maximumLength: 30, MinimumLength = 1] public string ...
Amal K's user avatar
  • 111
0 votes
2 answers
132 views

How can I associate algorithm-specific data to the objects it works with, efficiently yet cleanly?

I'm writing in C++, but this problem applies to most non-high-level languages, and possibly some high-level ones as well. I have a graph of heterogeneous nodes. The graph can be instantiated by ...
Helloer's user avatar
  • 293
3 votes
1 answer
180 views

How to model workflows

I'm building a helpdesk-type system, where there are: Customer - can submit/resubmit tickets; Manager - can review submitted tickets, assign to developers (one ticket to multiple developers), review ...
Deniss Kozlovs's user avatar
-3 votes
1 answer
159 views

Determining MPG over a range of time using Dictionary and Class Objects

A group of friends are tracking the miles per gallon for each of their cars. Each time one of them fills up their gas tank, they record the following in a file: His or her name, The type of car they ...
RaksMen's user avatar
3 votes
3 answers
4k views

Separating Code into Smaller Files in C

I am in the process of cleaning up my code and making it easier to maintain. I am doing this by turning my 5000+ line file into separate smaller files. I have successfully created separate source and ...
Remixed123's user avatar
2 votes
2 answers
598 views

How to present a stable data model in a public API that allows internal data structures to be changed without breaking the public view of the data?

I am in the process of developing an application that allows users to write C# scripts. These scripts allow users to call selected methods and to access and manipulate data in a document. This works ...
Max Palmer's user avatar
8 votes
4 answers
3k views

How do we keep dependent data structures up to date?

Suppose you have a parse tree, an abstract syntax tree, and a control flow graph, each one logically derived from the one before. In principle it is easy to construct each graph given the parse tree, ...
Geo's user avatar
  • 349
4 votes
10 answers
2k views

Standardized Data Structure Interface

I want to work with a variety of data structures (arrays, singly/doubly linked lists, sorted structures, etc.) on a plug-and-play basis. For example, I want to be able to easily swap in and out the ...
max's user avatar
  • 1,115
7 votes
3 answers
547 views

Users creating instances from a template - is there a software pattern that corresponds to this use case?

I am looking into designing a system where users build a template item and then create many instances based on this template.They then need to be able customise each instance but I also need for them ...
Adam Butler's user avatar