Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Time in Words problem solution. I got this problem's answer. But How these codes are made? What elements are used to make this code??

The Time in Words problem solution. I got this problem's answer. But How these codes are made? What elements are used to make this code?? I need all the detailed information about it. Because I have a presentation. So I have to explain this problem. Please write down about it in detail as a PARAGRAPH.

Please look at the attached picture and output. For this problem, I need HOW THESE CODES ARE MADE, WHAT ELEMENTS ARE USED IN THIS CODES AND MANY MORE DETAIL INFORMATION. PLEASE WRITE THIS AS A PARAGRAPH. ****** Typing will be best.

image text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { = ! I = Scanner sc = new Scanner(System.in); Integer hour = Integer.parseInt(sc.nextLine()); Integer min = Integer.parseInt(sc.nextLine()); String[] numNames = { "", "one", " two", " three", " four", " five", six", " seven", "eight", " nine", "ten", "eleven", twelve", " thirteen", " fourteen", "fifteen", "sixteen", seventeen", " eighteen", " nineteen" }; String[] tensNames = { "", "ten", " twenty", "thirty", " fourty", 'fifty", "sixty", "seventy", "eighty", " ninety" }; String sepStringi =" minutes past"; String sepString2 =" minutes to "; String minString = if (min o) System.out.println(numNames[hour].trim() + " o'clock"); else if (min == 15) System.out.println("quarter past " + numNames[hour].trim()); else if (min 30) { min = 60 - min; if (min == 1) sepString2 =" minute to "; if (min

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions