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
Directory services store information in a heirarchical structure. Which statements about Organizational Units (OUs) of a directo
NeX [460]

Answer:B

Explanation:

Specific files within an OUs or container are called object.

5 0
3 years ago
A=3<br> b = 2<br> print (a ** b)<br> What is output?
Lady bird [3.3K]

Answer: ( 3**2)

Explanation: honestly I can't help you. Try google it is waiting for you with open harms.  

6 0
2 years ago
Read 2 more answers
Should Gladys call the legal authorities? Which agency should she call?
tiny-mole [99]

Answer:

The answer to this question can be defined as below:

Explanation:

Yes, Gladys is called the legal authority. In the whole situation, legal officials can be concerned, even though the situation can proceed to fraud. Then it will be acceptable to make a report to the Justice Department.

  • In a corporation, it should always tend to avoid the issue, like leaking information, leaking the glamorous info to the press.
  • They may have a contract within the organization to avoid all of this.
3 0
3 years ago
Which of the following statements are true?
grin007 [14]

Answer:

I think the answer are two which are B and C

7 0
3 years ago
"You have a user who needs to keep desktop devices such as keyboard, monitor, and mouse permanently connected so that they can b
svet-max [94.6K]

Answer:

Docking Station is the correct answer of the following question.

Explanation:

A docking station is a technology system that is able to communicate capacities touchscreens with the other machines with few or no work.

The docking station is a system connecting a machine to many devices.

  • The docking station lets you attach to gadgets you have not been able to use in the future.
  • Not always connected with machines are docking station items such as sloped-panel displays and interchangeable lens cameras.
8 0
2 years ago
Other questions:
  • explain the key reasons why entity relationship modeling is important, and determine at least (1) way in which it impacts the ov
    5·1 answer
  • Create an instance of your queue that accepts java.lang.String Objects. Starting with an empty queue, use the enqueue(E e) metho
    15·1 answer
  • The number of bits per pixel is called what
    7·1 answer
  • Suppose that class OrderList has a private attribute double cost[100] which hold the cost of all ordered items, and a private at
    14·1 answer
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • What is the most common way for an attacker outside of the system to gain unauthorized access to the target system?
    15·1 answer
  • Why is failure important when you are designing a solution to a problem?
    6·2 answers
  • What will be the results from running the following code?
    5·1 answer
  • What is an example of an assumption and dependency that an automated stocking application project would include in an SRS?
    13·1 answer
  • True or false. windows server standard edition supports software-defined networking
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!