Skip to content

Rory Hackney

Software Developer

Web Developer / Designer

A menu in the console showing results and asking for a new menu selection.

Java Drawing Sine Curve Menu

January 2023 - February 2023

Tags

  • Back End
  • Java
  • Software Development

Java project that accepts user input, validates it, and uses it to select options from a menu, calculate a sine curve area, and draw the sine curve when requested using Graphics. One of my first Java projects.

This was one of my first projects in Java, where I began to learn to gather input from the user, validate and process that input, and display different visuals and results.

A menu in the console showing results and asking for a new menu selection.

Feel free to download the code from my GitHub repository, or watch the video below to see what the program does. The menu has these options:

  1. Calculate the y value (vertical position) for a given x value (horizontal position, in radians) on a sine graph.
  2. Calculate the area of the sine graph roughly using between 1 and 500 rectangles. More rectangles is more accurate.
  3. Draw the sine curve with 1 to 500 rectangles for a visualization, using the DrawingPanel import from the text buildingjavaprograms.com to simplify Graphics.
  4. Exit the program.

Thanks for checking out my project!

Back to Portfolio