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
agasfer [191]
3 years ago
13

Create an enumeration named Month that holds values for the months of the year. With JANUARY equal to 1, FEBRUARY equal to 2, an

d so on through DECEMBER equal to 12. Write a program named MonthNames that prompts the user for a month integer. Convert the user’s entry to a Month value, and display it. Make sure your integer prompt message does not contain any month names (January, etc.) as this will cause the tests to fail! For Example: "Enter a month number >> " does not contain month names and will work properly.
Computers and Technology
1 answer:
maria [59]3 years ago
4 0

Answer:

import java.util.Scanner;

public class Question {    

   public enum Months{

       JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER

   }

   public static void main(String args[]) {

     

     Scanner scan = new Scanner(System.in);

     System.out.println("Enter a month number>>: ");

     int inputNumber = scan.nextInt();

     

     if(inputNumber > 12 || inputNumber < 1){

         System.out.println("Please enter a valid number.");

     } else {

         System.out.println(Months.values()[inputNumber - 1]);

     }

   }

}

Explanation:

The import statement at the top of the class is to help us receive user input via the keyboard. The class was defined named "Question". Then the enum was declared listing all the months. Then the main function was declared. The Scanner object was created as scan, then the user is prompted for input which is assigned to inputNumber. The user input is validated to be within the range of 1 - 12; if it is outside the range, the user shown an error message. If the input is correct, the appropriate month is displayed to the user. To get the appropriate month, we subtract one from the user input because the enum class uses the zero-index counting; it start counting from zero.

You might be interested in
Why is outfitting a workplace with video games in a technology development company consiered a strategic use of money
Jlenok [28]

video games help with hand-eye-coordination and they help with your strategic abilities

3 0
4 years ago
Three reasons why users attach speakers to their computer
Alla [95]
For media sound
For the game's multimedia sound
For essential system sound
5 0
3 years ago
What are some similarity's between NES console and consoles today
blondinia [14]

Answer:

Old game consoles

New game consoles

Old games consoles like the NES, SNES, the SEGA Genesis were manufactured during the 1970's This generation started in the first and ends in the fifth

New game 3-D consoles like the PS3, X-Box 360 and the Wii U were manufactured during the late 90s to right now. This generation started in the sixth and ends at the eighth.

Facts

They have introduce a lot of game genres and characters like the Mario bros, The Legend of Zelda series, The Tetris game, and Sonic the Hedgehog series.

Genres like platformers and side scrollers were introduced in the 2-D era

New game consoles has introduce game genres like First Person Shooters. Games like Call of Duty and Halo are examples

The answer

The differences between an old console and a new console is not only the modeling of either the game console, but the functional properties and the way it operates. From each generation , there are about eight generations of consoles right now

The difference between an old generation of consoles and a new genration of console

Sources

http://www.answers.com/Q/What_is_the_difference_between_the_old_games_consoles_and_the_new_games_consoles

Pictures and more facts

The X-Box sucessor, the X-Box 360 was released in November 22, 2005 in the United States. Games like Halo and Call of Duty are the games that introduced really good First-Person Shooters

The Playstation 1, PSx, or the PS1 was made in September 9th 1995 in North America. The games that was in for the playstation is the famous Crash Bandicoot and Spyro the Dragon series and a few 2-d games.

The second picture the Super Nintendo Entertainment System or the SNES, was release to America in 1991 and is the sucessor of the NES

The games that was in the system was Super Mario World 1-2, The legend of zelda 3, which were one of the best selling games on the system

The first picture the Nintendo Entertainment System or the NES, that was released to America in 1985 and it was the best selling console at its time.

The games it introduce was of course Super Mario Bros 1-3, The Legend of Zelda 1-2

The third and last picture is the SEGA Overdrive or SEGA Genesis was releases to America in 1989 and rivaled with the SNES during the time.

Games that was with the system was SEGA's blue mascot Sonic the Hedgehog 1-3 and Knuckles, Teenage Mutant Ninja Turtles

PS1 fact

Even though the PS1 has its 2-D games, it also has 3-D games like the Crash Bandicoot and Spyro series made by Naughty Dog, who also did the Last of us game

Explanation:

the similarities are they both play games they both load some type of disk etc.

3 0
3 years ago
Read 2 more answers
Which feature in word automatically corrects typos, minor spelling errors, and capitalization as you type? autocomplete spelling
Fed [463]
I think auto correct.....,
8 0
3 years ago
Suppose you develop an app and want to generate revenue but do not want to maintain the app. What would be your best choice?
valentinak56 [21]
I think it would be d
6 0
4 years ago
Other questions:
  • Francis works in the human resources division of a large oil and gas company in Texas. Francis' tasks include maintaining payrol
    14·1 answer
  • You are angry at a friend who forgot to meet you for lunch, and you decide to write an e-mail about how it made you feel. What s
    11·2 answers
  • Being technologically literate requires being able to ______.
    11·2 answers
  • how can you repin an image on your Pinterest pin board A. click on the "repin" button B. click on the "add pin" button C. click
    7·2 answers
  • When a defendant pleads guilty to one offense just to have another offense dropped, this is what type of plea bargain
    12·2 answers
  • What is the real meaning of hack and crack?
    6·1 answer
  • Differentiate between the broadcasting and telecommunication
    5·1 answer
  • Which of the following would be an appropriate use of a check box control?
    15·1 answer
  • What's wrong with this python code i don't know what's wrong with both of them
    11·1 answer
  • Which description best applies to a macro?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!