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,
My daughter is currently a freshman in algebra 2. She struggled a little in algebra and doesn’t remember much. There are review problems that is really stressing her out. She would like in person tutoring and she would probably need sessions to be on the weekends on later in the day.
- Posted by Sarah ,
Demo your expertise to more students while building up your profile by answering questions on Ask An Expert.
- Posted by Wyzant
I am looking for a computer programming tutor.
- Posted by Tasneem,
My 4th grader is really struggling with his reading and comprehension skills. He does very well in all other subjects, but reading is always a struggle. I've tried multiple programs to help, but with only limited improvements.
- Posted by Dan,
Hi,
I am a complete beginner, and I need to be able to speak Spanish on the job site, could someone help me with conversational Spanish with 3 lessons a week?
It would have to be in my home. I'm 23, male.
- Posted by Maxime,
I’m looking for a teacher to work with my 6-year-old niece on a structured homeschool curriculum suited to her age. She is on the autism spectrum, so we’d love someone patient and experienced in creating a supportive learning environment.
We’re hoping for about 2 hours a day, 3 days a week (10 am – 12 noon), with some flexibility on the days. Please let me know if this might fit with your approach and availability.
- Posted by Ebai,
Requested Time: Thu, Aug 07 at 3:00 PM EDT
My daughter will be starting 2nd grade this year and I don’t think she is ready. I’m looking for someone to get started ASAP. I want her to start out the school year feeling confident with math and reading.
- Posted by Tiffany,
With a new tutoring job posted every minute, Wyzant can help grow your tutoring business.
Sign up now for free