Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Would love for explanations of the code to!! Programming Assignment 1 In this assignment you are to import github repo by link (https://classroom.github.com/a/mrukqwYR) and write

image text in transcribedWould love for explanations of the code to!!

Programming Assignment 1 In this assignment you are to import github repo by link (https://classroom.github.com/a/mrukqwYR) and write programs to solve the following problems. As with all assignments, remember the following submission steps: - Make sure your code passes at least all the provided JUnit tests - Create and test Javadoc code documentation - Save, commit, and push all code changes - Confirm the latest code is visible via the "Files" section of your repository website Problem a (PA1a.java) Write a program to help carpenters. Sometimes measurements are given in terms of yards, feet, and inches. Your program will convert these three numbers into a total number of inches. When running, it will prompt the user first for the number of yards, then the number of feet, and finally the number of inches. Assume all numbers are whole (integers). Your program must compute the total number of inches by converting each of the three inputs into inches and summing them all together. Finally, print out the total length in inches. Recall that 1 yard =3 feet, and 1 foot =12 inches. The following represents a sample run of the program in which the user inputs 1 for the number of yards, 2 for the number of feet, and 3 for the number of inches (yielding a correct output of 63 total inches). Note that the JUnit tests, and grading, will be very picky about exact spacing, spelling, and capitalization. Enter number of yards: 1 Enter number of feet: 2 Enter number of inches: 3 Total number of inches: 63 Problem b (PA1b.java) Write a program to do the reverse of Problem a. It prompts the user for a length in inches, then converts that total number of inches into yards, feet, and inches. Note that you do not convert the number of inches separately into yards, then feet, then inches. Instead, the program must calculate how many yards there are in the given number of inches, then convert the remaining inches into feet, and finally have the left over inches directly. For example, if the user enters 50 for the total number of inches, your program should compute that that is equal to 1 yard, 1 foot, and 2 inches. The following represents a run of the program using this sample input (again, pay very careful attention to spacing, spelling, and capitalization). Enter number of inches: 50 Yards: 1 Feet: 1 Inches: 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

AQ=ActualQuantitySQ=StandardQuantityAP=ActualPriceSP=StandardPrice

Answered: 1 week ago