All Questions
Tagged with java object-oriented
727 questions
0
votes
3
answers
174
views
Java exceptions that show the message when converted to String
I’m working with custom exceptions in Java for stack operations. However, I’m unsure if the exception handling is being handled properly, especially in terms of how exceptions are thrown and caught. ...
0
votes
1
answer
61
views
Bulk conditions evaluation throwing a single RuntimeException exception
Bulk conditions evaluation throwing a single exception of a configurable type for all unfulfilled conditions.
It is developed around several design patterns:
(1) fluent interface to configure the ...
3
votes
1
answer
215
views
Simulate an Automated Teller Machine (ATM)
(Game: ATM machine) Use the Account class created in Programming Exercise
9.7 to simulate an ATM machine. Create ten accounts in an array with id
0, 1, . . . , 9, and initial balance $100. The system ...
6
votes
3
answers
469
views
First Java Program: A Basic GUI Library Management System with JavaFX
Requirements:
Add/Delete member.
Add/Delete book.
Issue/Return book.
Review Request:
General coding comments, bad practices, style et cetera.
Code:
Main.java:
<...
3
votes
1
answer
123
views
Amount Transfer Between Different Accounts - Improved Version
This is an improved code version for Amount Transfer Between Different Accounts
Welcoming any further improvements for this.
...
4
votes
1
answer
104
views
Sequentially bidirectional find the indexes of an element into a collection (after second thought)
The util class to find all the indexes on an element into a Collection supports forward and reverse lookup starting from a given index along with changing the ...
4
votes
1
answer
216
views
Amount Transfer Between Different Accounts
I implemented the below classes for transfer amount between different accounts. Used ConcurrentHashMap and Stamped Lock to handle concurrency.
Am I missing any important concepts here? Are there any ...
6
votes
2
answers
876
views
Reduce String Length With Thread Safety & Concurrency
I implemented the below URL Shortener class. Used ConcurrentHashMap to handle concurrency.
Short URL building logic may not be optimal, but it ensures that only ...
2
votes
0
answers
71
views
Classes for Config and logical operators
I have a spring cloud gateway application with this yml structure for request validation:
...
3
votes
1
answer
229
views
A library management system
Following is my code for a library management system. I am pretty new to OOD and trying to learn it. I am specially looking for ways where any design patterns can be useful here. I tried to make ...
1
vote
2
answers
105
views
simple Text Table utility
A small utility to print data in an ascii table
TextTable
...
5
votes
2
answers
289
views
2048 game in Java
I am a beginner learning Java, and I coded a command line version of the game 2048 for practice. Any feedback, especially regarding best practices, object-oriented principles, and tidying up the code ...
2
votes
2
answers
97
views
Java Queue data structure
Could you review this implementation of a queue data structure according to the principles of Object Oriented Programming and Clean Code?
...
2
votes
3
answers
234
views
Java Clean Code, use of enums in data structure
I have defined a data structure in Java that allows to manage certain type of elements like a Queue, with the special feature of using 2 inner rows (windows) to attend elements:
...
-1
votes
1
answer
69
views
Object build while sequential read user input [closed]
The implementation reads sequentially the user's input changing the type to build according to user choices.
There are two main components a conditional structural sharing (...