Prepare a java program to create a gui

Assignment Help JAVA Programming
Reference no: EM13706555

Program: Create a JAVA GUI (With Frame), which allows to input a year and when hit the check button, will demonstrate 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;

}

}

}

Prepare a java program to create a GUI and show the picture of the zodiac. Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.

Reference no: EM13706555

Questions Cloud

Prepare a program for a bank that allows the user : Prepare a program for a bank that allows the user to enter an amount of money in cents. Show the number of whole dollars the bank will give the customer in exchange.
Compute and display net weekly pay : You need to prepare a C++ program in which you declare variables that holds an hourly wage, a number of hours worked, and a withholding percentage.
Write a select statement that returns three columns : Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, you can group the result set by the EmailAddress and OrderID columns.
Implement a stock quote service as a web application : Implement a stock quote service as a web application using HTML, a java servlet, and a JSP page
Prepare a java program to create a gui : Prepare a java program to create a GUI and show the picture of the zodiac. Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.
Computes the area of a triangle : The subsequent function computes the area of a triangle, but contains three errors. Find the errors and fix them.
Which detects even parity : Consider the subsequent circuit, which detects even parity. There are one output, even, and three inputs, a(2), a(l) and a(0), which are grouped as a vector or bus.
What is the cardinality of an entity : What is the cardinality of an entity - Why is it useful to consider the cardinality when designing a database?
Database design and end-user requirements : How pervasive are conflicts between database design and end-user requirements? Should the two go hand-in-hands?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program to play a variation of the game

Roll two dice. Each die has six faces representing values 1, 1, ..., and 6. Check the sum of the two dice. If the sum is 2, 3, or 12 you lose; if the sum is 7 or 11, you win. If the sum is another value (4,5,6,8,9, or 10) a point is established.

  Javascript validation - cgi program

CGI mailer script form-mail.pl to your server's cgi-bin directory, and change the permissions on the script to make it executable - BMIS 310

  Write a program arrayprocessing.java

Write a program ArrayProcessing.java that reads a file name from the keyboard. The file contains integers, each on a separate line. You then create a corresponding array with integers from the lines.

  Overview in this assignment you are provided with an

overview in this assignment you are provided with an interface that contains a generic type.you are asked to create two

  Console application for a small car servicing company

Develop a program for the service department staff - Console application for a small car servicing company

  Develop a java program

Develop a Java program which, given the width, length and depth (in metres), of a swimming pool, determines and outputs.

  Delete a random element from an arraylist

Elements in an ArrayList and picking one at random to remove. Unfortunately, this slow, since deleting a random element from an ArrayList is slow because of all the shifting. For this question, you should modify the poll()method so that it runs in..

  Wite a java application that allows the user to read

write a java application that allows the user to read validate store display sort and search the account

  The letters of the alphabet a through z

The letters of the alphabet A through Z can be represented in Morse code. Each letter is represented by a combination of up to four dots and/or dashes, as shown below. Use Java to write and run a console-window program that can convert an English ..

  Method called printpowersof2 that accepts a maximum number

Write a method called printPowersOf2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. For example, consider the following calls: printPowersOf2(3); printPowersOf2(10)

  Specify, design, and implement a class

Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob with the numbers 0 through 39 marked on the edge, and it has a three-number combination, which we will call x,y,z.

  Java script program for song

Construct a JavaScript program that declares and prints an array that includes at least twenty of your favorite songs.

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