Need the rest of the code filled in import java.util.Scanner; public class TimeConversionDriver { public static voi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Need the rest of the code filled in import java.util.Scanner; public class TimeConversionDriver { public static voi

Post by answerhappygod »

Need the rest of the code filled in
import java.util.Scanner;
public class TimeConversionDriver
{
public static void main(String[] args)
{
// statements for output
formatting

System.out.println("*******************************");
System.out.println("Start - Time
Conversion Program");

System.out.println("*******************************");

// variable to store user input
int numSeconds;
/**
* TO DO: ask the user to enter
the number of seconds to be converted
* and assign the value to
numSeconds
*/
// add your code here
System.out.println("Enter the number of
seconds you would like to be converted.")
double numSeconds;

// you do not need to add anything
below this line
// create TimeConversion object
TimeConversion converter = new
TimeConversion();
// call method to calculate
Decaseconds

converter.showDecaseconds(numSeconds);
// call method to calculate
Jiffies

converter.showJiffies(numSeconds);
// call method to calculate New York
minutes

converter.showNewYorkMinutes(numSeconds);
// call method to calculate Nano
Centuries

converter.showNanoCenturies(numSeconds);
// call method to calculate
Scaramuccis

converter.showScaramuccis(numSeconds);
// statements are for output
formatting

System.out.println("*******************************");
System.out.println("End - Time
Conversion Program");

System.out.println("*******************************");
}//end main method
}//end class
Class File
public class TimeConversion {

/**
* Constructor
*/
TimeConversion(){
}
/**
* TO DO: showDecaseconds method
* Given a number of seconds
calculates
* and display decaseconds
*/
// add your code here
Decaseconds = numSeconds / 10;

/**
* TO DO: showJiffies method
* Given a number of seconds
calculates
* and display jiffies
*/
// add your code here
/**
* TO DO: showNewYorkMinutes method
* Given a number of seconds
calculates
* and display New York minutes
*/
// add your code here
/**
* TO DO: showNanoCenturies method
* Given a number of seconds
calculates
* and display Nanocenturies
*/
// add your code here
/**
* TO DO: showScaramuccis method
* Given a number of seconds
calculates
* and display Scaramuccis
*/
// add your code here

}//end class
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply