Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

i am doing problem solving with robotics and was wondering how do you calibrate light sensor using java
simple java dice game
Each player starts-out with a cumulative score of zero. Then each player rolls three
dices and a random number appears for each dice. The summation of each number is
added in each player’s score. The winner is the player that has the highest score in x
turns based on what the players initially decided.
Create a Parent class called Players (e.g., an Interface class). The Players class should have setter and getter methods for the following attributes: name, surname, age, score,allScores and averageScore.
create a simple java program that enter his name, surname and age. Note that the program has an age limit of 18 years old.
·It captures the “NumberFormatException” that is thrown if a string cannot be converted to a number. When the exception is captured, the user must be informed that he is an idiot.
·Define a new exception called “NotMemberException”. The exception must be thrown if the registration number entered by the user does not exist in the list of StudInfo. Your program should catch the exception as follows. It should first try to see if the number before and after the one entered exists. If so, it informs the user that they probably made a typo and provides them the name of the found student. If neither is found it must simply inform the user that such registration number does not exist.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package exhandassgn;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

/**
*
* @author christoforos
*/
public class Main {

/**
* @param args the command line arguments
*/
static ArrayList<StudInfo> ls;

public static void main(String[] args) {
populate();
System.out.println("Enter a registration number:");
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try {
String inp = in.readLine();
int rVal = Integer.parseInt(inp);
StudInfo foundStudent = getStudent(rVal);
System.out.println(foundStudent.getName());
}
catch(IOException ioe) {System.out.println(ioe.getMessage());}
}

static void pop
I'm needing to make a game for my programming class but my start button wont show up
// TODO: Initialization things here.
}

/**
* This is where things will get drawn to the screen within your applet.
*/
public void paint(Graphics g)
{
// Draw our hello world
Font myFont = new Font("Ariel", Font.BOLD, 17);

g.setColor(new Color(236, 236, 236));
g.fillRect(2, 6, 640, 480);
g.setColor(Color.RED);
g.setFont(myFont);
g.drawString("In a world of good and evil, A hero must rise and save Bleedia", 25, 25);
g.drawImage(Logo, -9, 50, null);
g.drawImage(Start, -9, 50, null);
setSize(624, 500);
g.drawString("Build, Destroy, Kill, and Suicide!!!!", 200, 290);
g.drawString("E10", 590, 470);
}
}

The logo is working
I need the start button to work!
Thanks :D
Write a class TelephoneNumber that will hold a telephone number. An object of this class will have attributes .. areaCode—a three-digit integer,exchangeCode—a three-digit integer,number—a four-digit int
and the methods
1.TelephoneNumber(aString)—a constructor that creates and returns a new instance of its class xxx–xxx–xxxx or,if the area code is missing, xxx–xxxx. Throw an exception if the format is not valid Hint hyphen in the telephone number with a blank. To accept a telephone number containing hyphens, you could process the string one character at a time or learn how to use Scanner to read words separated by a character—such as a hyphen—other than whitespace.)
2 .toString—returns a string in either of the two formats shown previously for the contructor.ae
using a text editor,create a text file of several telephone numbers,using the two formats described previously.Write a program that reads this file,displays the data on the screen,creates an array whose base type is Telephone Number.allow the user to
Write an application containing three parallel arrays that hold 10 elements each. The first array holds four digit student ID numbers, the second holds first names and the third holds the students grade point averages. Use dialog boxes to accept a student ID number and display the student's first name and grade point average. If a match is to found, display an error message that includes the invalid ID numbers and allow the user to search for a new ID number. This is for an assignment that is due monday,would appreciate it if you can help me before the due date.
Your lecturer wishes to store the exam marks for java, and perform an analysis of the marks. The marks are expressed as a percentage. There are 15 students that wrote the exam. write the java program that will input the marks for each student and store in an array called Supp. The input must be validated before being stored. Also determine and display the highest and lowest mark. the inputs are: 15,27,38,2,98,42,87,92,99,13,5,72,67,2,1. This is for an assignment and its really urgent, if you could please help me. thanx
Write an application containing three parallel arrays that hold 10 elements each. The first array holds four digits student ID numbers, the second holds firstnames and the third array holds the students grade point averages. Use a dialog box to accept a student ID number and display the student's first name and grade point average. If a match is to found, displays an error message that inclides the invalid ID number and allow the user to search for a new ID number.
LATEST TUTORIALS
APPROVED BY CLIENTS