Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Java Expert


Home >> Java

problem 1) prepare a program that helps teachers to test their students in their knowledge with colors and shapes. The program consists of two classes ColorShape and testColorShape. Class ColorShape has two instant variables choiceColor and choiceShape (both int). Your class must also have a constructor and the setMethod for the instant variables.

In your test class you must use JFrames to show the shape of certain color (for ex a red square). You require to start first by asking about shape and then about the color using JOptionPane. Whether answer is wrong or right the user must be shown another problem (new colored shape) and you require to state that answer was correct or incorrect. If the student enters a 0 as an answer (either for color or shape) for a problem the program must exit.

Important Notes:

Your require to generate the shapes and colors randomly using random numbers

In order to show new shape for the new problem, you need to set the JFrame as invisible, change the settings of your JFrame and then set it back to visible using the following command

Application.setVisible(false); a invisible

Application.setVisible(true); a visible

When the user input a zero in any field, the program would exit

If you faced a problem in closing the JFrames use the following command

System.exit(0)

Your frame must be of reasonable size and the shapes must be clear and centered

The user must enter both choices then the program specifies if the answer is correct or not.

Java, Programming

  • Category:- Java
  • Reference No.:- M94597

Have any Question? 


Related Questions in Java

Problem specificationyou have been approached by a local

Problem Specification You have been approached by a local university for designing and implementing a room access control system on the university campus. Access to each room on each floor of each campus building is cont ...

Importantuse jgrasp for editingobjectives - at the

IMPORTANT: use JGRASP for editing. Objectives - At the conclusion of this assignment students will have demonstrated that they can: Validate input data from a keyboard. Use loops to repeat actions in a program Use a Rand ...

Learning outcomes1use different program control statements

Learning Outcomes: 1. Use different program control statements in a programming language 2. Demonstrate the use of arrays with a programming language 3. Define and work with classes and objects in a programming language. ...

Assignment introduction to programming using java1 write a

Assignment: Introduction to Programming Using Java 1. Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email ad ...

Assignmentin this assignment you are required to specify

Assignment In this assignment, you are required to specify and implement a Java The language is Java. In this assignment, you are required to specify and implement a Java class named IntSortedList. The instances of IntSo ...

Write a java program and pseudocode to read a number up to

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form. Example: for input 23 ...

Assessment scenarioproblemjava program for a music social

Assessment Scenario/Problem Java program for a Music Social Network system. You can work on this coursework either alone or in a pair with a colleague, not necessarily from the same seminar or lab group. If you elect to ...

Create a console based non-gui java program using netbeans

Create a console based, non-GUI Java program using NetBeans Integrated Development Environment (IDE) that displays "Hello world!" Take a screenshot that shows the program's successful compilation and execution. Submit bo ...

Introduction to programmingjava programming assignment

Introduction to Programming Java Programming Assignment: Objects and Loops Your previous Alice programs implemented the count (for) and while loops. This assignment will apply the same concepts to Java, along with a thir ...

Modify the week two java application using netbeans ide to

Modify the Week Two Java application using NetBeans IDE to meet these additional and changed business requirements: The company has recently changed its total annual compensation policy to improve sales. A salesperson wi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro