All Questions
174 questions
7votes
6answers
9kviews
Printing a Hollow Butterfly pattern
I am a beginner to Java and have studied up to loops only. After loops lecture above pattern was given to print as homework. I have successfully managed to print this pattern with following code: <...
6votes
1answer
663views
Crossword puzzle app
I was hoping someone could give me any tips or advice on this program I wrote for my high school class. The point of the program is to create a workable crossword puzzle in the console. If it works ...
2votes
2answers
2kviews
Input validation that verifies a boolean assignment using a Boolean object
Taking online college course and I'm new to Java. We just learned about input validation. I've used input validation pretty comfortably for strings, ints, and whatnot. But I had to validate a boolean ...
1vote
1answer
272views
Car price calculator
I'm writing this simple program for school, and using NumberFormat on all the variables seems very repetitive (Note that we were asked to use the ...
4votes
3answers
463views
Analyzing baby name data in CSV files
First time using code review. I am still a student so there will be a lot to be desired. Basically as part of the homework we are told what methods to create (Method names are given with their ...
2votes
1answer
1kviews
Java implementation of Employee class hierarchy
We were tasked to do this assignment where there is the base class employee and two derived class part-time and full-time employees. Here is what I came up with: ...
4votes
3answers
803views
FIFO array/queue
I'm new to programming and was tasked with programming a generic circular FIFO queue, without using anything but an underlying array and self-programmed methods. I still don't know how to approach ...
3votes
1answer
647views
ATM Console Program with Java
I am a freshman Computer Engineering student. Variable names are pretty straightforward; I believe it would be easy to understand. Program explanation: First you have to create an account and deposit ...
0votes
2answers
140views
Searchable database with Java and SQL
What does the code do? Albeit unfinished (it does work, it's just not complete yet), the code creates a database (members.db) where telephone numbers, IDs, and ...
5votes
1answer
709views
Space Invaders clone for a college project
Edit: the project was submitted, and I got a good grade! :D I am finishing up a project for my computer science class. The project is a space invaders clone that uses the JavaFX library to provide ...
1vote
1answer
493views
Java implementation of Yahtzee
I'm trying to implement the game of Yahtzee in java. This is for a project at my university so I tried to be as clean and to use the best code practices as possible. The part in particular that I ...
4votes
3answers
16kviews
Student Grade Calculation
Develop a smart application as Student Grade Calculator(SGC). Create a class Student with following private attribute : int id, ...
2votes
1answer
88views
ArrayPractice with shifting arrays, generate new arrays populated with even numbers, and more
This is from my second homework assignment in my Data Structures class (in which we use Java), we were simply given the task of filling out the functions shown below (they were empty before) and I was ...
26votes
6answers
3kviews
HashSet and TreeSet
I got some homework in which I had to take the novel War and Peace and put it into a HashSet and TreeSet respectively. I had to time it, to check differences and my question is whether my ...
11votes
8answers
18kviews
Return a string without the first two characters
I'm new to Java and am trying to solve a scenario. Even though I've succeeded and it works, I've just wondered if there was a more practical way of doing this task. Is there a quicker or more ...