Tagged Questions
-1
votes
1answer
94 views
Sample Java Program ideas [closed]
My neighbour's son has just started learning programming. (java)
I have given him some simple programs to do and i am all out.
I gave him,
Prime No,
Fibonacci series,
Factorial Number,
Palindrome,
...
2
votes
1answer
298 views
Is this high coupling?
Question
I'm currently working a on an assignment for school. The assignment is to create a puzzle/calculator program in which you learn how to work with different datastructures (such as Stacks). ...
0
votes
2answers
744 views
How to update an existing excel file using java program? [closed]
I've made a file browser in java that opens and read already been made excel files. (using Apache poi 3.9 library)
program read those files perfectly but i want to update some of those files. how can ...
2
votes
2answers
218 views
Parallel Class/Interface Hierarchy with the Facade Design Pattern?
About a third of my code is wrapped inside a Facade class. Note that this isn't a "God" class, but actually represents a single thing (called a Line). Naturally, it delegates responsibilities to the ...
1
vote
1answer
165 views
Are Protected Auto-Cast Methods Ok?
I often have superclasses that contain a more abstracted form of a class as a member variable than my subclasses need. I find my code littered ((ClassName)variableName).methodName(). Is the best way ...
3
votes
2answers
229 views
Can classes violate Single Responsibility if they delegate internal tasks?
I have two classes Output and Timeline, neither of which violate SR, but the two of them are linked together. So what I'd like to do is have a class called Elco (there's a reason behind the name) that ...
-3
votes
2answers
500 views
Java: The best way to learn it when MOOCs and books are not enough? [closed]
This topic was taken from Stack Overflow, but it was put on-hold due to Opinion-based question. So I moved it to here.
I've had some great troubles with my homework exercises and I've used ...
0
votes
1answer
53 views
Creating Set Subclasses or Allowing Outside Configuration
I have a TriggerCaller and a TriggerAction class. The Caller "calls" the do() method on the action, which is set with the TriggerCallers setAction() method. The rest of the program should deal with ...
3
votes
5answers
284 views
Need thoughts on a course curriculum for an entry-level programmer [closed]
Would love to know your thoughts on a curriculum that will be developed for people that want to get started in the programming field. The goal of the course is to help it's students to ensure that ...
1
vote
2answers
138 views
if i have many calls of single method that returns field value, is it better to make a local variable?
In a method, i have calls of single method of another object that returns field value, like foo.value(), which is defined like Field value() {return this.value;} Is it better to make a local variable, ...
3
votes
3answers
523 views
articles in variable names and hard-coding strings
re-edited by author: no this is not 2 questions. This is one question about code review questions containing two separate points. Please do not edit my question.
For naming variables, the two sides ...
3
votes
3answers
740 views
When should I use or not BooleanUtils.isTrue(…) and BooleanUtils.isFalse(…)? [closed]
About this function: org.apache.commons.lang3.BooleanUtils.isFalse(Boolean bool) and the similar isTrue, my co-work (less experienced) use it for every boolean in the code. I am trying to convince him ...
0
votes
2answers
75 views
Making subclass more type-specific with accessors
I have a super class: TriggerManager with a subclass TimedTriggerManager. NOTE: I'm working in java
TimedTriggerManager only deals with TimedTrigger s, a subclass of Trigger. TriggerManager ...
0
votes
2answers
123 views
Code formatting for variable declarations [closed]
Is it looked down upon or bad to write multiple variable declarations on the same line? As in:
boolean playMoreGames = true; int length;
boolean win; int ...
3
votes
1answer
74 views
Should I write a wrapper within a manager object?
I have three classes that work together to do one function (from the perspective of the rest of my program). There is a little bit of set up between them, so, to make it easier for the rest of my ...