Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please follow the steps number instructions and write the program in java thank you public class Month { private int nonthkumber: final string[] monthName={January, February,

image text in transcribed
image text in transcribed
image text in transcribed
please follow the steps number instructions and write the program in java thank you
public class Month \{ private int nonthkumber: final string[] monthName=\{"January", "February", "March", "April", "May", "June", "July", "August" "September", "October", "November", "December" \}; //step1 create a constructor that accepts the number of the month as an argument. //step2 create a constructor that accepts the name of the month. It should set the monthoumber field to the correct corresponding value. //step3: create a seturathulumber, method, //step4icreate a getMonthuruber method I*: Qreturn A reference to a string representation of the object. / l8 step6: create a equals method eparam month2 Another month object. ereturn true if the two Month objects contain the same contblumber, false otherwise. step7: create a greaterThan method Eparam month2 Another Month object. ereturn true if the nonthnumber of the calling objects is greater than the monthulumber of the argument, false otherwise. Deno program for the Month Class Chapter 9, Programming Challenge 6 / import java, util 5 canner; public class MonthDemo1 \{ public static void main(string[] args) \{ Scanner kb= new Scanner(System.in); Sxsternout orintln("Please enter two numbers in between 112)i int x=kb, arextrnt () ; int y=kb arextInt(); //steps: create two Month objects based on the inputs x and y //step9: Call equal method to compare the two objects to see whether the contain the same month or not

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions