1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zavuch27 [327]
3 years ago
12

Write a java program that would request user name, id number, and state the time the user has reported at work.​

Computers and Technology
1 answer:
Troyanec [42]3 years ago
3 0

Answer:

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.time.LocalDateTime;

import java.time.format.DateTimeFormatter;

import java.util.Date;

import java.util.Scanner;  

public class Main {

   private static final DateFormat dateformat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

   private static final DateTimeFormatter datetimeformat = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");

   public static void main(String[] args) {

       

       System.out.println("Enter your ID and Name");

       LocalDateTime current = LocalDateTime.now();

       Scanner sc1 = new Scanner(System.in);  

       String Name= sc1.nextLine();

       int ID = sc1.nextInt();

       System.out.println(Name + "reported at:");

      System.out.println(datetimeformat.format(current));

   }

}

Explanation:

The above program saves the current date-time as well, at the time when the user enters his name and ID. And it prints the same on the screen. Further, you can store these in a data structure like list or class or you can store it in a database as well. Remember, this is the difference between a program and a web application, and not to forget we have a toolkit in case of the web application. And here we are working on the console. Also, a web application has a front panel and back panel. However, a program only solves a computing problem, and there is no well-designed interface with the user. However, programming is the root of all other programmings like web programming, mobile app programming, etc.

You might be interested in
You have a host device with an assigned IP address of 192.168.15.100 and a subnet mask of 255.255.255.192. To what network does
aalyn [17]

The options are missing from the question.

Below are the options.

A) 192.168.15.0

B) 192.168.15.16

C) 192.168.15.32

D) 192.168.15.64

Answer: The correct option to the question is option D

192.168.15.64

Explanation:

The Network is: 192.168.15.64/26 11000000.10101000.00001111.01000000

Then the Broadcast is: 192.168.15.127 11000000.10101000.00001111.01111111

We see the HostMin as: 192.168.15.65 11000000.10101000.00001111.01000001

And the HostMax as: 192.168.15.126 11000000.10101000.00001111.01111110

3 0
3 years ago
Consider this binary search tree:______.
Nitella [24]

Answer:

The new root will be 2.

<em></em>

Explanation:

The binary tree is not properly presented (See attachment)

To answer this; first, we need to order the nodes of the tree in a pre-order traversal.

We use pre-order because the question says if something is removed from the left child.

So, the nodes in pre-order form is: 14, 2, 1, 5, 4, 16.

The root of the binary tree is 14 and if 14 is removed, the next is 2.

<em>Hence, the new root will be 2.</em>

7 0
2 years ago
All HTML5 webpages must begin with the HTML element _____.
Paul [167]

Answer:

yes, an HTML webpage must begin with an HTML element

Explanation:

<HTML> <!-- Website Content --> </HTML>

3 0
2 years ago
Application software (apps) includes all the programs that allow you to perform specific tasks or applications on a computer. In
bulgar [2K]

Answer:

Microsoft Excel / Spreadsheet software.

5 0
3 years ago
Who developed the Great Compromise ​
Nostrana [21]

Answer:

Roger Sherman

The solution came in the form of a compromise proposed by statesmen Roger Sherman and Oliver Ellsworth of Connecticut. The Great Compromise created two legislative bodies in Congress.

Explanation:

comment how it helps

7 0
3 years ago
Other questions:
  • Marie uses a browser to visit a blog. What is the unique identifier of the blog?
    13·2 answers
  • How can you ensure you don't go over your budget?
    8·1 answer
  • To prepare a data character for transmission, a ____ bit is added to the beginning of the character and informs the receiver tha
    11·1 answer
  • Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested
    15·1 answer
  • Which statements accurately describe the Bookmark feature in the Audio/Video control bar? Check all that apply.
    13·1 answer
  • Computer Science uses the power of ______________ to solve problems.
    10·1 answer
  • Use the drop-down tool to select the word or phrase that completes each sentence.
    7·1 answer
  • 7. A patent is an example of a rare and valuable resource. Indicate whether the statement is true or false and also justify it.
    14·1 answer
  • Explain with examples what is software​
    6·1 answer
  • A field value is currently not in any group. what happens when you try adding it to an existing group?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!