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
Sever21 [200]
3 years ago
13

Write a JAVA application program that will get a line of text containing a date in US form from the user, and then change this d

ate to European form. Begin by asking the user to enter a date in the form of month/day/year. Store this date in a String variable. Next, use the appropriate String methods to swap the month and day parts of the date, and replace the slash marks with periods. Print the revised String to the screen. Please note that users are allowed to input the year in two digits or four digits, and input the month and day in one digit or two digits. Your program should be able to handle all possible cases.
Computers and Technology
1 answer:
rosijanka [135]3 years ago
6 0

Answer:

The Java code is given below with appropriate comments as well as the sample output

Explanation:

import java.util.Scanner;

public class Main

{

  public static void main(String[] args) {

System.out.println("Enter a date in the form mon/day/year:");

Scanner scanner = new Scanner(System.in);

String inputDate = scanner. nextLine();

 

//Split the string string with / as the delimiter

String[] dateComponents = inputDate.split("/");

 

//Rearrange the date and month part and join with '.' as sepertor

String outputDate = String.join(".", dateComponents[1], dateComponents[0], dateComponents[2]);

 

System.out.println("Your date in European form is:\n" + outputDate);

  }

}

<u>Sample Output </u>

Output 1:

Enter a date in the form mon/day/year:

01/22/2020

Your date in European form is:

22.01.2020

Output 2:

Enter a date in the form mon/day/year:

1/22/20

Your date in European form is:

22.1.20

You might be interested in
HELP PLEASE!! WILL MARK FIRST AND MOST RELIABLE ANSWER BRAINLIEST!!~~~~What is the primary difference between sort and filter?
tatiyna

Answer:

A

Explanation:

Example: when scrolling through a list of shows, if you filter for action shows, only shows that match the action description would appear

3 0
3 years ago
______is a multimodal application software platform. the centrealized and shared database system ties the entire organization to
m_a_m_a [10]

Answer:

ERP.  

Explanation:

Enterprise Resource Planning Is the software platform for bidirectional applications. The main objective of  ERP it shared the database system and connects the enterprise as a whole so that data can be reached the once and made accessible to all users.

The main advantage of Enterprise Resource Planning is that Enterprise cycle parallelization or optimization it also the boost performance of the organization and saving the time.

3 0
3 years ago
________ software consists of operating systems, utilities, device drivers, and language translators.
Hunter-Best [27]

Answer:

"System"

Explanation:

<u>System</u> software consists of operating systems, utilities, device drivers, and language translators.

(not much explanation as it was a fill in the blank which explains itself haha)

Have a nice day!

    I hope this is what you are looking for, but if not - comment! I will edit and update my answer accordingly. (ノ^∇^)

- Heather

3 0
2 years ago
Presentation software allows users to _____.
svlad2 [7]

Answer: technolyy is a graphic igneger that allows itenas to go throught...

8 0
3 years ago
Read 2 more answers
You are asked to add speech to a robotic receptionist that sits at the front desk of a large organization. The robot has an anim
Firlakuza [10]

Explanation:

The requirements would be that the receptionist robot detects the incoming person and speak;

<em>Good morning (based on time), Welcome to XYZ organization. How can i help you. Do you need to visit HR, finance, marketing, sales, engineering etc representative or other function?</em>

Now based on that a visitee information is printed out.

Limitation

A person comes who does not understand what robot speaks

Interaction with existing dialogue would be made possible through speech recognition system

The system will work well as speech recognition has now been used in many functions and robots have also now become quite advanced

7 0
3 years ago
Read 2 more answers
Other questions:
  • Kim is creating a one-page presentation in Word about her parents’ home country, Vietnam. She has inserted images that are each
    7·2 answers
  • To prevent class objects from being copied or assigned, you can:
    8·1 answer
  • All of the language commands that the CPU understand make up the CPU's
    15·1 answer
  • Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space.
    7·1 answer
  • Explain why an IT department and a user support group may disagree about the responsibility for the development of end-user appl
    8·1 answer
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • Finding information on the Web is easy thanks to _____________, which provide on-screen menus, making navigation of the web as s
    11·1 answer
  • Mention how to install antivirus software in your computer, either by following the instructions given on installation CDs or we
    6·1 answer
  • Question 1 (1 point)
    8·1 answer
  • A _______ attack uses software to try thousands of common words sequentially in an attempt to gain unauthorized access to a user
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!