Skip to main content

All Questions

Tagged with
6 votes
1 answer
663 views

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 ...
Sean Riley's user avatar
7 votes
6 answers
9k views

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: <...
Strange Alchemist's user avatar
5 votes
3 answers
271 views

Hotel booking with multiple options. Improvement through subclasses?

The code below runs perfectly fine as I want it to. I'd like to create more subclasses to get a better overview over the whole code. Can I place the setter and getter as well as the methods into the ...
Marcel's user avatar
  • 51
1 vote
2 answers
200 views

integer log base 10 function without using java.lang.Math?

I am assigned to a task of creating a function int logBase10Estimate(int n) that returns the log of a number base 10. The answer is integer part only.(w/o using the Math class) Is this okay? ...
zvz's user avatar
  • 23
4 votes
1 answer
199 views

Parsing weather station XML on raspberry pi

This if for a school project that is all about getting the most performance possible out of a relatively weak computer. For this project we have received a weather station report generator that ...
Bobeliciousbob's user avatar
0 votes
1 answer
61 views

Spaceship Operation in for Lexicographic Comparison

I have written a program in Java 8 using BlueJ. There is just one function of type byte that accepts two String values and return 1 if the first word comes before the second in alphabetical order, and ...
Riley Jones's user avatar
2 votes
1 answer
2k views

Salaries exercise

Hey there guys, I have just completed an exercise for uni and I would really like some feedback as I'm pretty new to using java. Areas that I could especially use some input in this instance: ...
user avatar
3 votes
2 answers
130 views

Add three integers and report the sign of the sum

I am in my first high school programming course; the assignment is: Write a program that asks the user to input three integers and outputs a message indicating their sum and whether it is positive,...
Conor Oepkes's user avatar
5 votes
2 answers
2k views

User input happy birthday program

For self-study homework I made a Java program that takes user input, creates people as objects, and says "Happy Birthday" to each person. I am just wondering what mistakes I made here or how it could ...
Steven Halverson's user avatar
4 votes
1 answer
307 views

Drawing consecutive rectangles with an algorithm

I have an assignment to draw rectangles that get larger and larger each time I draw them. Just like shown below. I've labeled them TL = Top Left, TR = Top Right, BL = Bottom Left, BR = Bottom Right. ...
Luke Kelly's user avatar
-1 votes
1 answer
916 views

Compound interest calculator homework [closed]

I am a beginner at coding Java and am having a tough time understanding what is wrong with this code. This is an assignment I had posted about earlier and I also went to a Java tutor at my school for ...
Tori's user avatar
  • 1
2 votes
2 answers
549 views

Integer to Roman Numerals (1 - 2999)

This is a homework assignment. Convert an integer (1 - 2999) to roman numerals. I was wondering if I could make my code more efficient. The way I have it set up is that I take the digits of the input (...
WanderingGiraffe's user avatar
0 votes
1 answer
692 views

Java exercise: String processing and type conversion

The exercise is from a Java-course in which I'm enrolled. The classes Book and APIResponseParser were provided by the instructor. For Book I had to add just a few getter- and setter-methods. For ...
michael.zech's user avatar
  • 4,814
4 votes
2 answers
8k views

Pascal's Triangle - Java Recursion

This is a fully functional implementation of a program to ask the user for a location on Pascal's Triangle, but I kind of cheated by expanding the base case to include row 0 and the 1st and last ...
nathaniel sokolow's user avatar
1 vote
4 answers
97 views

Form a [email protected] address, eliminating diacritics from a name

I'm an amateur programmer who just started learning programming, my school gave me an assignment to create code that reads a surname and lastname from an input dialog box and then to edit those name ...
Semi Turdean Rajhi's user avatar

15 30 50 per page