Program of javascript

Assignment Help JAVA Programming
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! ");

}

}

Reference no: EM13726051

Questions Cloud

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.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Program obtaining the new scriptdownload and save the

program obtaining the new scriptdownload and save the attached comment cgi mailer script form-mail2.pl to your servers

  Improve the word jumble game

Improve the Word Jumble game presented in this chapter so that each word is paired with a hint. If the player enters hint, then the program should show the corresponding hint.

  Write a program to find solution tocryparithmetic puzzle

Write a program (Crypta.java) that finds a solution to the cryparithmetic puzzle: TOO + TOO + TOO+ TOO = GOOD

  What value would be returned from call to its size() method

If a collection stores 5 objects, what value would be returned from a call to its size() method?

  Program that prompts the user to enter the year and display

Write a program that prompts the user to enter the the year and first day of the year and displays the calendar table for the year on the console. For example , if the user entered the year 2013, and 2 for tuesday, January 1, 2013, your program shoul..

  Rationale for declaring an array of objects of the class

Explain the dimension of the array and why you chose that number of elements for the object array.Can you give the answer ASAP?

  Die class that can hold an integer

Design a die class that can hold an integer from 1 to 6. use the dice class to create a dice game. in this game, the user chooses a number between 2 and 12 inclusive

  The bookstore wants you to make an object-oriented model

student bookstore at pleasant creek community college situation the bookstore staff at pleasant creek community college

  Statements to create a collection of integers

Write Java statements to create a collection of integers, and to initialize each element of the collection to -1. Then, using a for each statement to print the value of each element.

  Which parts of the assignment were you not able to complete

Which parts of the assignment were you not able to complete fully? For each, explain why you were unable to complete this part and what steps you took to attempt to complete it. Give me as much detail as possible such that I may award partial cred..

  String as input and returns the reverse of that string

Write a method that takes a String as input and returns the reverse of that String. Then write a second method that uses the first method to test whether or not an input String is a palindrome.

  How to link different classes forms

How to link different classes forms. When a person clicks on A, B, or C the program will go to the addEmployee form or Punch In/Out form in Java.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd