public static String getJulianDay(int m, int d, int y) - Returns the Julian day (001-365/366) for the given m/d/y date (option #3 in the sample program run above). Be sure to include leading zeroes to make the day use three positions. Take leap year into account (see below).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter9: Records (struct)
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
Need two methods in Java to be used in a different class first method returns Julian day from date entered ex:(8/12/21) Second method returns the reformatted date in Julian format
public static String getJulianDay(int m, int d, int y) - Returns the Julian day
(001-365/366) for the given m/d/y date (option #3 in the sample program run
above). Be sure to include leading zeroes to make the day use three positions.
Take leap year into account (see below).
public static String getJulianFormat(int] datePieces) - Reformats the date
in datePieces (where datePieces stores the month at position 0, then the day at
position 1, then the year at position 2) as a new String with formatting YYYYddd.
The ddd is the Julian day for the date (you should call getJulianDay to get it). It
returns a String with the formatted date.
Transcribed Image Text:public static String getJulianDay(int m, int d, int y) - Returns the Julian day (001-365/366) for the given m/d/y date (option #3 in the sample program run above). Be sure to include leading zeroes to make the day use three positions. Take leap year into account (see below). public static String getJulianFormat(int] datePieces) - Reformats the date in datePieces (where datePieces stores the month at position 0, then the day at position 1, then the year at position 2) as a new String with formatting YYYYddd. The ddd is the Julian day for the date (you should call getJulianDay to get it). It returns a String with the formatted date.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning