Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the analysis and design portion of the Course Project. See the Course Project page in the Introduction & Resources area under Modules for more

Complete the analysis and design portion of the Course Project. See the Course Project page in the Introduction & Resources area under Modules for more information.

On mission-critical software projects, a great deal of quality control takes place. One effective and common technique is to employ a variety of reviews on the work being performed. Now that you have completed your analysis and design work for the course project, your documentation can be reviewed and evaluated by your peers. Don't worry; this is not meant to be threatening or harshly judgmental. It is merely a technique for improving the quality of the product by getting more perspectives.

Each project team must upload their analysis and design document.

Each student must review the documents written by the other teams and provide feedback on them. Do you like something they did? Did you see a problem that they overlooked? Can you think of any scenarios that they might not have considered?

Once you have received feedback from your classmates, read each of their comments and consider how you might improve your work as a result of the feedback you received. When you present your project at the end, we want to hear how the feedback shaped the final product.

this is the project.

can you please evaluate on this.

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

class Guess extends JFrame

{

JTextField t1,t3;

JLabel j4;

ButtonListener bl1;

ButtonListener3 bl3;

int rand=(int) (Math.random()*1000);

int count=10;

public Guess()

{

//Get the container

Container c = getContentPane();

//Set absolute layout

c.setLayout(null);

//Set Background Color

c.setBackground(Color.WHITE);

//Creating label Enter a number.....

JLabel j1=new JLabel("Enter a number b/w 1-1000");

j1.setFont(new Font("tunga",Font.PLAIN,17));

j1.setSize(270,20);

j1.setLocation(300,60);

//Creating TextField for input guess

t1=new JTextField(10);

t1.setSize(50,30);

t1.setLocation(350,80);

//Creating Label for Display message

j4=new JLabel("guess my number");

j4.setFont(new Font("tunga",Font.PLAIN,17));

j4.setSize(270,20);

j4.setLocation(290,130);

//Creating guess text field

t3=new JTextField(10);

t3.setSize(40,20);

t3.setLocation(160,10);

t3.setText(count+"");

//Creating guess Label

JLabel j6=new JLabel("Guesses Remaining ");

j6.setFont(new Font("tunga",Font.PLAIN,17));

j6.setSize(270,20);

j6.setLocation(210,10);

//creating 3 buttons

JButton b1=new JButton("Guess");

b1.setSize(100,30);

b1.setLocation(180,200);

bl1=new ButtonListener();

b1.addActionListener(bl1);

JButton b3=new JButton("Play Again");

b3.setSize(120,30);

b3.setLocation(330,200);

bl3=new ButtonListener3();

b3.addActionListener(bl3);

//Place the components in the pane

c.add(j4);

c.add(j1);

c.add(t1);

c.add(t3);

c.add(b1);

c.add(b3);

c.add(j6);

//Changing TextFields to UnEditable

t3.setEditable(false);

//Set the title of the window

setTitle("GUESS MY NUMBER");

//Set the size of the window and display it

setSize(550,350);

setVisible(true);

setDefaultCloseOperation(EXIT_ON_CLOSE);

}

private class ButtonListener implements ActionListener

{

int bestScore=100;

public void actionPerformed(ActionEvent e)

{

if(count>0){

int a = Integer.parseInt(t1.getText());

count=count-1;

if(a

{

j4.setText(a+" is too low, try again!!");

}

else if(a>rand)

{

j4.setText(a+" is too high, try again!!");

}

else

{

j4.setText("CORRECT, YOU WIN!!!!");

}

}

else

{

j4.setText("Game Over, You loose ");

}

//setting focus to input guess text field

t1.requestFocus();

t1.selectAll();

t3.setText(count+"");

}

}

private class ButtonListener3 implements ActionListener

{

public void actionPerformed(ActionEvent e)

{

rand=(int) (Math.random()*1000);

t1.setText("");

t3.setText("");

j4.setText("Try and guess my number");

count=10;

t3.setText(count+"");

t1.setEditable(true);

t1.requestFocus();

}

}

public static void main(String[] args)

{

new Guess();

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions