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

  Prepare executable program and a dictionary program

Prepare executable program and a dictionary Program.

  Write a java program in a netbeans project

Write a Java program in a NetBeans project

  Modify the book class to accommodate multiple authors

modify the Book class to accommodate multiple authors using one of the components from the Java Collection Framework.

  Program that will ask the user for total debt of customer

Write a Java program that will ask the user for the (1) name, (2) gender, and (3) total debt of customers.

  Write java program which will permit user to make selection

Write the Java Program which will permit the user to make selection. You will present user with two options to perform, then you will perform action selected by user.

  Write a program that reads a list of real numbers.

Write a program that reads a list of real numbers. After the program ends it should print out only the unique numbers

  Class that stores information about a report

Create a class that stores information about a report containing multiple currency transactions in multiple currencies. This includes the name of the report and each of the transactions that occurred.

  Write servlet code for accepting two numbers from user

Write the servlet code for accepting two numbers from user show addition and multiplication of numbers. If error occurs, then call JSP error page to display suitable error message.

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Classes using set and get methods

Create a java program that contains two classes using set and get methods. I need the program to return the area and perimeter of a rectangle. I wrote a program and he returned to me saying I used the wrong constructors and didn't create a the sec..

  Approximate the volume of cheese in a rectangular hunk

You will create a program that will approximate the volume of cheese in a rectangular hunk of Swiss cheese. For this approximation you will assume that the holes in the Swiss cheese are of two types: spherical bubbles (all of the same size) or cyl..

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