write a program that will prompt the user for the number of weeks, days, hours, minutes...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
write a program that will prompt the user for the number of weeks, days, hours, minutes and seconds and your program will compute exactly how many seconds there are over that period of time. Create a Java application called Lab4_1. Example run Seconds Computation Program How many WEEKS : 2 How many DAYS : 3 How many HOURS : 17 How many MINUTES : 42 How many SECONDS : 3 Total SECONDS during that time period is: 1532 23 1532423 PART 2 - More Seconds Since that was so much fun, you have now decided that it would be interesting to be able to do the reverse. In other words, if you are given a specified number of seconds your program will compute the number of whole weeks, days, hours, minutes and seconds that it breaks down into. Your task is to write a program that will prompt the user for the number of seconds and compute the appropriate weeks, days, hours, minutes and seconds that it would cover. Create a Java application called Lab4_2. Example run Reverse Seconds Computation Program What is the total number of Number of whole WEEKS Number of whole DAYS Number of whole HOURS Number of whole MINUTES : Number of # SECONDS: : : SECONDS: 1532523 23723 write a program that will prompt the user for the number of weeks, days, hours, minutes and seconds and your program will compute exactly how many seconds there are over that period of time. Create a Java application called Lab4_1. Example run Seconds Computation Program How many WEEKS : 2 How many DAYS : 3 How many HOURS : 17 How many MINUTES : 42 How many SECONDS : 3 Total SECONDS during that time period is: 1532 23 1532423 PART 2 - More Seconds Since that was so much fun, you have now decided that it would be interesting to be able to do the reverse. In other words, if you are given a specified number of seconds your program will compute the number of whole weeks, days, hours, minutes and seconds that it breaks down into. Your task is to write a program that will prompt the user for the number of seconds and compute the appropriate weeks, days, hours, minutes and seconds that it would cover. Create a Java application called Lab4_2. Example run Reverse Seconds Computation Program What is the total number of Number of whole WEEKS Number of whole DAYS Number of whole HOURS Number of whole MINUTES : Number of # SECONDS: : : SECONDS: 1532523 23723
Expert Answer:
Answer rating: 100% (QA)
import javautilScanner public class Lab41 public static void mainString args Scanner scanner new Sca... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Which combination of investments would likely be most suitable for an investor who is willing to accept a potential loss of investment capital to achieve a high growth rate?
-
What are logical fallacies and how can they affect our decision-making?
-
Consider a beam of spin-1/2 particles prepared in the quantum state: Answer the following questions. 140) = 1+)-1-). 1. Show that the above state is normalised. Prove that the state is also...
-
On January 1, 2012, Albert invested $1,000 at 6 percent interest per year for three years. The CPI (times 100) on January 1, 2012, stood at 100. On January 1, 2013, the CPI was 105; on January 1,...
-
Calculate each compound event probability: a. P(X 10), = 11.0 b. P(X > 3), = 5.2 c. P(X < 2), = 3.7
-
Tablet PC Comparison provides a wide variety of information about tablet computers. The company's website enables consumers to easily compare different tablets using factors such as cost, type of...
-
Under CCP 581(b)(1), barring certain exceptions, without a court order a plaintiff has an absolute right to dismiss his or her complaint any time before the commencement of trial. Further investigate...
-
It is conjectured that when fields are overgrazed by cattle there will be a substantial reduction in the available grass during the subsequent grazing season due to the compaction of the soil. A...
-
4. Insurance companies have stated that 55% of car crashes occur within 5 miles of home. Records were obtained for 500 car crashes and showed that 385 of those 500 had occurred within 5 miles of...
-
In this assignment you will be required to complete tasks related to job costing. Download the document, complete the required information, save the document, and submit the assignment in Blackboard....
-
4. Use matrices to solve the following three simultaneous equations. Set up the equations in the format [A][X]=[B] and solve the equations using [X]=[A][B]. Use your matmult function to do the...
-
Raheem Furniture distributors is solely owned by Mr Shaheed Naidoo. Mr Naidoo is registered as a provisional tax paper with SARS. After 6 months Mr Naidoo estimated taxation for the year will be R350...
-
A press release hopefully works to "tease" journalists and media outlets into learning more about a topic. Read "Communicating Science: Press Releases at EHP" (located in Topic Resources). Based on...
-
In Australia, national office markets have observed a flight-to-quality over the last 2 years, with tenants prioritising building services, amenities and location against older/cheaper alternatives....
-
On 26 February 1995 Barings Bank collapsed as a result of 860m of losses accumulated by Nick Leeson, a Singapore trader. Leeson had been successful in the low-risk arbitrage of Nikkei stock index...
-
What is the difference between optimizing a press release for search versus optimizing a press release for social media?
-
Determine New Cost of Equity and Briefly discuss the Effect of Taxes. Current D/E Ratio 0.6 No Tax Rate 0% Current Cost of Equity 11% The new cost of equity Current Cost of Debt 4% Target weight of...
-
Dawson Companys balance sheet information at the end of 2019 and 2020 is as follows: Additional information: The company did not issue any common stock during 2020. Required : Next Level Fill in the...
-
Write a program that copies one file to another. Have the program take the filenames from the command line. Have the program report if it cannot open a file.
-
Rewrite the following so that it doesnt use using declarations or using directives: #include using namespace std; int main() { double x; cout < < "Enter value: "; while (! (cin >> x) ) { cout < <...
-
a. What does the following short program display and why? #include using namespace std; double up(double x) { return 2.0* x;} void r1(const double &rx) {cout < < const double & rx ;} void r1(double...
-
The following are cutoff values for the upper 5% of a \(t\)-distribution with either degrees of freedom 10, 50 , or 100: \(2.23,1.98\), and 2.01. Identify which value belongs to which distribution...
-
Researchers interested in lead exposure due to car exhaust sampled the blood of 52 police officers subjected to constant inhalation of automobile exhaust fumes while working traffic enforcement in a...
-
Suppose that you are interested in determining whether exposure to the organochloride DDT, which has been used extensively as an insecticide for many years, is associated with breast cancer in women....
Study smarter with the SolutionInn App