Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This first assignment is all about the chapter 1 and 2 class lectures and readings. There are tour parts to this project, with the
This first assignment is all about the chapter 1 and 2 class lectures and readings. There are tour parts to this project, with the first part being the easiest, and then the last part is the most complex. You MUST include all of your pseudocode and comments that are relevant to what you are doing and why. Parts Part 1_ _In this first part, create a console program will ask the user the number of years and months as two separate questions, and then output the number of seconds that it represents. Assume that a year is 365 days and a month is 30 days. Part 2_ _In this second part, your task is to write a console program that will ask the user the number of gallons, quarts, and pints as three separate questions, and then output the number of liters (L) that it represents. Part 3_ _In this third part, your task is to write a GUI program to accept input from the user in the form of a decimal value that represents the currency in dollars and output two separate numbers that represent the number of dollars and cents. Part 4 In this third part, your task is to write a GUI program to accept input from the user in the form of either miles/hour or kilometers/hour, then ask the user if the measurement is in miles or kilometers. The user will enter the text "miles" or "kilometers". Once you have both entries, you will then output in feet/second. Assignment Constraints In this assignment, you are allowed to use the following: If / else statements Some of the topics that you ** may not ** use include: Loops Additional methods Conversion classes String class methods The only classes that ** you may import ** are the following: javax.swing.JOptionPane java.util.Scanner Conversions For all of your conversions, you must create constants for any of your conversion factors. For example, if the assignment is to convert from inches to feet, then you should create a constant like INCHES_TO_FEET = 12. Also, your output numbers should be provided in two decimal places.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started