Which allows to input a year and when hit the check button

Assignment Help JAVA Programming
Reference no: EM13168502

Create a JAVA GUI (With Frame), which allows to input a year and when hit the check button, will show the picture of Chinese zodiac animal! I am trying to make a calculator: i have the method for or the calculation method to show how to calculate:

import java.util.Scanner;

public class ChineseZodiacDemo {

public static void main (String []args) {

Scanner input = new Scanner(System.in);

System.out.print("Enter a year: ");

int year = input.nextInt();

switch (year % 12) {

case 0: System.out.println("monkey"); break;

case 1: System.out.println("rooster"); break;

case 2: System.out.println("dog"); break;

case 3: System.out.println("pig"); break;

case 4: System.out.println("rat"); break;

case 5: System.out.println("ox"); break;

case 6: System.out.println("tiger"); break;

case 7: System.out.println("rabbit"); break;

case 8: System.out.println("dragon"); break;

case 9: System.out.println("snake"); break;

case 10: System.out.println("horse"); break;

case 11: System.out.println("sheep"); break;

}

}

}

Reference no: EM13168502

Questions Cloud

What is the current growth rate in the economy : What is the growth rate in sales for the past three years and are revenues and expenses growing at the same rate? What was the experience in the past few years?
What allows the ip layer to determine where to send a packet : what allows the IP layer to determine where to send a packet next? What settings are used to make that decision?
Use a loop with indirect or indexed addressing : Use a loop with indirect or indexed addressing to reverse the elements of the integer array in place. Do not copy the elements to any other array
Modify the program in 6a so that, in addition to the cents : Modify the program in 6a so that, in addition to the cents, the user enters the denomination of the coin to which to convert the pennies, such as 5 for nickles or 25 for quarters.
Which allows to input a year and when hit the check button : Create a JAVA GUI (With Frame), which allows to input a year and when hit the check button, will show the picture of Chinese zodiac animal! I am trying to make a calculator: i have the method for or the calculation method to show how to calculate:
Determine the formula for x : When the compound spontaneously decomposes, the piston moves up, the temperature of the water reaches a maximum of 29.52°C, and then it gradually decreases as the water loses heat to the surrounding air.
How many cro42- ions are present : A sample of silver chromate (Ag2CrO4) has a mass of 24.7 g. (a) How many Ag+ ions are present? ions (b) How many CrO42- ions are present? ions (c) What is the mass in grams of one formula unit of silver chromate? g/formula unit
The array is sorted except the first one : the array is sorted except the first one
Write a lisp program to evaluate lisp arithmetic : Write a Lisp program to evaluate Lisp arithmetic expressions. Assume four operators may be used in expressions and they are +, -, *, and /. All these operators are binary, i.e., they are applied in an expression in this format

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java applet for grade of gas in costco gas station

Write a java applet (not a java application program) for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use.

  Object-oriented gui drawing editor

A simple object-oriented GUI drawing editor that allows a user to create, move and erase rectangles, squares, circles and lines in an interactive graphics. How can I draw move erase rectangles, squares, circles and lines in GUI/java.

  Write a program that asks the user to enter three names

Write a program that asks the user to enter three names

  Create a constructor in the subclass why

Assume there is a base class with multiple constructors, if the subclass inherits from the base class, do we need to create a constructor in the subclass? Why?

  T an array using insertion sort and track the number of swap

How to sort an array using insertion sort and track teh number of swaps during the sorting

  Write java program which will permit user to input data

Write the Java Program which will permit the user to input data. The data will be validated using a loop that requires the user to input the data until it is correct or in the correct range. T

  The williamsburg women''s club

The Williamsburg Women's Club offers scholarships to local high school students who meet any of several criteria. Write an application that prompts the user for a student's numeric high school grade point average (for example, 3.2), the student's num..

  Write a method in java that uses a switch statement

Write a method in JAVA that uses a switch statement and takes a person's age using an integer parameter , then checks if the age is valid (0-110), and then RETURNS a string based on the age

  It inherits the functionality of super class

It inherits the functionality of super class Package and contains an additional data member representing an additional fee per ounce charged for overnight-delivery service.

  Implementation of memory management

Implementation of memory management

  Write java programming to show number of credits for course

Write the java programming to solve following problem. We are given a student's marks in Calculus 1, CS1, and Physics 1 (each mark being between 0 and 100) also number of credits for each course.

  Java program to find a value at in index

Construct a main class named Array Program that generates an array of 50-integers, all ranging from one to one hundred.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd