Skip to main content

All Questions

0votes
3answers
175views

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. ...
Somesh Diwan's user avatar
6votes
3answers
469views

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: <...
Haider Ali's user avatar
3votes
1answer
215views

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 ...
Team B.I's user avatar
0votes
1answer
62views

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 ...
user avatar
6votes
2answers
876views

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 ...
Jill's user avatar
  • 297
4votes
1answer
104views

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 ...
user avatar
4votes
1answer
216views

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 ...
Jill's user avatar
  • 297
5votes
2answers
290views

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 ...
smwt's user avatar
  • 187
3votes
1answer
123views

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. ...
Jill's user avatar
  • 297
6votes
3answers
328views

Fruits and Vegetables Scale Program

I've been working on a project related to a fruit and vegetable scale program for about a month, and I'm relatively new to programming. In this project, I'm trying to adhere to object-oriented ...
Kerem Tazedal's user avatar
10votes
6answers
5kviews

Conway's Game of Life Object oriented implementation in Java

I have designed Conway's Game of Life in Java, the solution follows Object Oriented design and paradigm, please review and let me know the feedback Class Cell Cell ...
HariHaravelan's user avatar
3votes
1answer
229views

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 ...
Pankaj Kumar's user avatar
2votes
3answers
234views

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: ...
Cardstdani's user avatar
82votes
6answers
233kviews

Design a chess game using object-oriented principles

I would like to know if my approach is correct and how could it could be improved? Also, is there a way to get rid of the relation between the Piece and the ...
SummerCode's user avatar
1vote
2answers
105views

simple Text Table utility

A small utility to print data in an ascii table TextTable ...
Martin Frank's user avatar

153050per page
close