Descripte n An int feid that heids the humber of the month which is a value between 1 and 12 Ano-argument constructor that sets the Saer Reid to 1 eomstructor with one integrai parameter representing the number of the month , 2 value less than 1 or larger that 12 is passed the constructor A conttructor wth one string parameter representing the name of the month ter to the comesponding umber. feld value from another month cbject Integral parameter representing the number of the month (1, r that number. If the number is nota number between 1and 12, Teld to A copy constructor that coples the A string method with correspondie 29 b beteter January Febrary arc aril An integral method with one string parameter representing the name ofthe month and number. If the name is not one of the names from the st (case insensitive), then ret A no-arg integral method that returns the uber field value A void method with an integral parameter that sets the ber feld to that integral num Ano arg String method that returms the name of the month coresponding to the A void method with a string parameter representing the name of the month aar bune Duly

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question
ASSIGNMENT E
with your actual name wth the inuct felds and methoh
Creste a clas called
He/Method
Number
Description
An int fleld that helds the number of the month which is a value between 1 and 12
Ano-argument constructor that sets the ber leid to1
A constructor with one integral parameter representing the number of the month (1, 2 etc.) and sets the maber
feld to that value. Ifa valu less than 1 or larger that 12 is passed, the constructor should set aber to 1
A conttructor wth one itring parameter representing the name of the month (aary" February", etc.) and
CAN the scomeethod to set ter to the coresponding number.
A copy constuctor that cooles the sber field value from another month object
A string method with an integral parameter representing the number of the month (1, z etc) and return the
corresponding name for that number. If the number is not a number between land 12, it should return 1.
ber
Nane
Month
Month
selectome
Hanuary Febrary Harch apell kay bune buly Augst estebe beteter ovenber becenber
An integral method with one string parameter representing the name efthe month and return the corresponding
number. If the name is not one of the names from the list (case insensitive), then returns 1.
A no-arg integral method that returns the Nunber field value
A void method with an integral parameter that sets the Nuber feld to that integral number
A no-arg String method that returns the name of the month corresponding to the unber fleld value
A void method with a string parameter representing the name of the month: "January. February", etc.) and sets
the Number field to the corresponding number (1, 2. etc) using the seiechumber method
A Month method that returns a copy of the current object
A string method that returns a string with this format: "Month is NUMBER where NUMBER is the the field
Number
A Boolean method that accepts a Month object Month2 as an argument and returns tre if the data from that
object (its Nunber) is the same as the Nuber field of Month2 or fahe otherwise
An integral method that accepts a Month object as an argument and returnse ifNumber value is the same as the
number from the parameter, -1ifit is smaller, and 1 if it is larger
selectNumber
gelNumber
setNumber
getName
setName
copy
tosting
equals
compareto
For 5 points extra credit store the 12 months names into an enumeration type.
You are going to lose points if you do not name the class, the fields, or methods as requested. You should NOT have a field for the
month name: your code should compute the name of the month from the number when needed.
Create a program/project called YourNameAssignment6 (replace YourName with your actual namel in the same project as the
YourNameMonth. You will need to add the class Month to the project and add your code to the project class main method. The
program (code) should:
Create three objects: Montha using the first no-arg constructor, Month2 using the second constructor with z as an argument,
Montha using the third constructor with "october" as an argument, and Nontha using the fourth copy constructor from the
Month3
Use the getNunber to get the month number from objects Montna, Month2, Montha, and Month and output the them.
Use the getName to get the month name from objects Montha, Month2, Month3, and Monthe and output them
Use the setNunber to set the Month1 object value to s
Use the setNane with argument "June" to set the Month4 object value to.
Use the tostring to get the month string from objects Month1, Month2, Month, and Mantha and output the m.
Use the equals method of Monthi to compare its value with Month2 value and output the result
Use the compareto method of Month2 to compare its value with Month3 value and output the result
Use the copy method to create a copy of Month4 and testring on it to get the string message and output it
Document your code (meaning follow the Assignment Code Convention, explain what each ine of code does) You can lose additional
points for not documenting your code, for naming the programs and files as requested, not submitting the correct files, cheating
hardcoding the results, and using concepts we did not learn in class yet.
Take screenshots of the editor window (showing the entire source code and the entire output) and paste them in a Microseft Word
document called YourName Assignments-Screenshots.docx Replace YourName with your actual name If the entire code or the
output does not fit in one screenshot or it is not easily readable, create multiple screenshots and add them to the screenshots
document.
SUBMIT the YourNameAssignment6.java. YourNameMonth java source files and the YourNameAsignmente Screenshots
document on eCampus under the Assignment 6. Do not archive the files or subnit other file formats
Transcribed Image Text:ASSIGNMENT E with your actual name wth the inuct felds and methoh Creste a clas called He/Method Number Description An int fleld that helds the number of the month which is a value between 1 and 12 Ano-argument constructor that sets the ber leid to1 A constructor with one integral parameter representing the number of the month (1, 2 etc.) and sets the maber feld to that value. Ifa valu less than 1 or larger that 12 is passed, the constructor should set aber to 1 A conttructor wth one itring parameter representing the name of the month (aary" February", etc.) and CAN the scomeethod to set ter to the coresponding number. A copy constuctor that cooles the sber field value from another month object A string method with an integral parameter representing the number of the month (1, z etc) and return the corresponding name for that number. If the number is not a number between land 12, it should return 1. ber Nane Month Month selectome Hanuary Febrary Harch apell kay bune buly Augst estebe beteter ovenber becenber An integral method with one string parameter representing the name efthe month and return the corresponding number. If the name is not one of the names from the list (case insensitive), then returns 1. A no-arg integral method that returns the Nunber field value A void method with an integral parameter that sets the Nuber feld to that integral number A no-arg String method that returns the name of the month corresponding to the unber fleld value A void method with a string parameter representing the name of the month: "January. February", etc.) and sets the Number field to the corresponding number (1, 2. etc) using the seiechumber method A Month method that returns a copy of the current object A string method that returns a string with this format: "Month is NUMBER where NUMBER is the the field Number A Boolean method that accepts a Month object Month2 as an argument and returns tre if the data from that object (its Nunber) is the same as the Nuber field of Month2 or fahe otherwise An integral method that accepts a Month object as an argument and returnse ifNumber value is the same as the number from the parameter, -1ifit is smaller, and 1 if it is larger selectNumber gelNumber setNumber getName setName copy tosting equals compareto For 5 points extra credit store the 12 months names into an enumeration type. You are going to lose points if you do not name the class, the fields, or methods as requested. You should NOT have a field for the month name: your code should compute the name of the month from the number when needed. Create a program/project called YourNameAssignment6 (replace YourName with your actual namel in the same project as the YourNameMonth. You will need to add the class Month to the project and add your code to the project class main method. The program (code) should: Create three objects: Montha using the first no-arg constructor, Month2 using the second constructor with z as an argument, Montha using the third constructor with "october" as an argument, and Nontha using the fourth copy constructor from the Month3 Use the getNunber to get the month number from objects Montna, Month2, Montha, and Month and output the them. Use the getName to get the month name from objects Montha, Month2, Month3, and Monthe and output them Use the setNunber to set the Month1 object value to s Use the setNane with argument "June" to set the Month4 object value to. Use the tostring to get the month string from objects Month1, Month2, Month, and Mantha and output the m. Use the equals method of Monthi to compare its value with Month2 value and output the result Use the compareto method of Month2 to compare its value with Month3 value and output the result Use the copy method to create a copy of Month4 and testring on it to get the string message and output it Document your code (meaning follow the Assignment Code Convention, explain what each ine of code does) You can lose additional points for not documenting your code, for naming the programs and files as requested, not submitting the correct files, cheating hardcoding the results, and using concepts we did not learn in class yet. Take screenshots of the editor window (showing the entire source code and the entire output) and paste them in a Microseft Word document called YourName Assignments-Screenshots.docx Replace YourName with your actual name If the entire code or the output does not fit in one screenshot or it is not easily readable, create multiple screenshots and add them to the screenshots document. SUBMIT the YourNameAssignment6.java. YourNameMonth java source files and the YourNameAsignmente Screenshots document on eCampus under the Assignment 6. Do not archive the files or subnit other file formats
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to Coding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage