Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

write a payroll program that prompt a user to Enter his name, hourly rate, working hours in the week and display the amount earning by each employee in Rand.
Note: User is not allowed to enter any negative value for hourly rate and working hours.
write a java application to calculate the exponent value of a number using the following specifications:
prompt the user to enter an integer value. Pass the integer value to the main method square,which squares the number and to a method cubes the number. The results must be returned to the main method. The main method must print the results along with a suitable mesage
Hello, I have an assignment due and I am having trouble starting it. Everytime I try to attempt it I get lost, and can't think of which classes to create other than the main do it all class. Could u help me break down my assignment a little please? The assignment asks for me to make a program that can simulate traffic in a network of roads that have sensors at each intersection and I am to record the car's registration number, and name of the sensor, and time it passed into a text file. I don't need help with the coding but just the setting it up and structuring part. Thanks
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
LATEST TUTORIALS
APPROVED BY CLIENTS