I need someone to tutor me in my Java intro to programming class.
- Posted by Sommy,
Demo your expertise to more students while building up your profile by answering questions on Ask An Expert.
- Posted by Wyzant
I’d like help with my Programming Assignment 02 (Hourglass) for my Intro to Computer Science class. I’ve been carefully going through the assignment requirements, the example program provided by my instructor, and the supporting material (like the Fencepost Algorithm and the formatting guidelines for for-loops).
From my end, I feel like I’ve been making progress in understanding the Java concepts we’ve covered so far — constants, variables, for-loops, methods, and structured programming. I’ve also gotten more comfortable with the idea of breaking a bigger problem down into smaller, manageable methods. But where I run into difficulty is actually translating that knowledge into a full program that runs correctly from start to finish. Sometimes, I understand the theory but end up spending way too much time fixing details like spacing, indentation, or loop structure, and that slows me down a lot.
This assignment is about creating a number hourglass where the size of the hourglass is determined by a class constant (SCALE). The logic is straightforward on paper: the top half should go from SCALE down to 1, and the bottom half should go from 2 back up to SCALE. Each line has to print the correct number of periods on each side, the number itself repeated with spaces, and then periods again to finish the line. I know that the formula is basically int periods = SCALE – number; and that the Fencepost Algorithm helps when placing separators like spaces or numbers, but I still need practice applying these patterns smoothly inside loops.
- Posted by Zain,
With a new tutoring job posted every minute, Wyzant can help grow your tutoring business.
Sign up now for free