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

  Construct java program named collegelist

Construct a set of classes for a college to use in many student service and personnel applications. Classes you require to design include following:

  Determines the number of stages on the rocket

Write a program that reads these data and determines the number of stages on the rocket. Use the data file rocket2.txt. It contains a trailer line with the value -99 for all four values.

  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.

  Number of space characters in a string

Write a loop that counts the number of space characters in a string - You need to implement a program to find the number of spaces.

  Minimal spanning tree decreasing edge

minimal spanning tree decreasing edge dismissalreverse-delete algorithm. develop an implementation that computes the

  1 comparing portions of strings write an application that

1. comparing portions of strings write an application that uses string method region-matches to compare two strings

  E-marketing-e-commerce consultant

You are an e-marketing and e-commerce consultant. Mary and Joe Johnson, the owners of Book Bunker, have hired you to help them improve their sales both online and in their store.

  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.

  Returns the object with the largest measure

public static Measurable maximum(Measurable[] objects)that returns the object with the largest measure. Use that method to determine the country with the largest area from an array of

  Write a short java method to count the number of nodes

Write a short Java method to count the number of nodes in a circularly link list.

  Achieve these two important features

Java TM is a portable language, and being an object-oriented programming language, it also encourages component reusability. How does Java TM achieve these two important features

  Write an app that allows user to enter a seven-digit number

Write an application that prompts the user to enter the sales for each employee, then it calculates the salesperson's salary. The process repeats until the user finishes entering all employees' information

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