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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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