Reference no: EM13726051
Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee's name and town of //residence. Ten percent of the company's employees live in Wonder Lake; 30 percent live in Woodstock. Because these towns are both north //of the company, Black Dot wants to encourage employees who live in either town, to drive to work together.Write a Java program used to //accept an employee's data and displays it with a message indicating whether the employee is a candidate for the carpool. Save the class //as Carpool.java
import javax.swing.JOptionPane;
public class Carpool
{
public static void main(String[] args)
{
// Declarations
String name = "";
String town = "";
String nameString;// the input for the persons name
nameString = JOptionPane.showInputDialog(null,
"What is the Employee name?" , "Name Information " ,
JOptionPane.QUESTION_MESSAGE);
name = (input.JOptionPane());
String townString;// the input for the city
townString = JOptionPane.showInputDialog(null,
"What is the Home Town? " , "Address Information " ,
JOptionPane.QUESTION_MESSAGE);
town = (input.JOptionPane());
if(town == "Woodstock" || town == "Wonderlake")// here is where im having the problem, with the comparison
{
JOptionPane.showMessageDialog(null, nameString + " is eligible for the Carpool! ");
}
JOptionPane.showMessageDialog(null, nameString + " is not eligible for the Carpool! ");
}
}
Identify an important relationship
: Identify an important relationship (co-worker, boss, friend) in which you are having trouble gaining cooperation. Assess this relationship in terms of the influence currency model.
|
What point does the auther make about religion and terrorism
: When talking about the causes of errorism, what point does the auther make about religion and terrorism .
|
Determine expected activity times
: Needs some additional information to complete. The exact problem statement is "The following probabilistic activity time estimates are for a CPM/PERT network.
|
Important role that logistics plays in marketing
: 100 word discusion on When you reflect on the important role that logistics plays in marketing, what relationships from our other course concepts come to mind for you? Can you share any examples to illustrate your thoughts
|
Program of javascript
: Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee's name and town of //residence.
|
What traditional role of women in society throughout history
: What has been the traditional role of women in society throughout history? How does the wealth of a civilization affect the lives of women?
|
Convey your company image through a logo
: What this assignment has taught you about the Object-Oriented programming concept; be sure to use OO terminology to express your thoughts; connections to OO programming may be difficult to make, but you should be able to make some
|
Analysis of all of the aspects of an applicant
: Selecting the right person for an open position requires an analysis of all of the aspects of an applicant, including his or her past experience (knowledge, skills, and education), his or her application and resume, and the interview responses..
|
Enhanced cleverskater
: Create an cleverSkater. Use that code as the basis for your World. In addition to the skateForward, spin and skateAround methods, create skateBackward and jump class-level methods.
|