Java test program

Assignment Help JAVA Programming
Reference no: EM13165115

Write a Java test program, all your code should be in the main method, that determines what type of organization is indicated by a web address. Your program should allow the user to enter a web address. It should check the last few characters of the address and print a message indicating the type of organization. For instance, if the web address ends with .com, your program should print the message Business.

Your code should check for the follow address types:

.com
.org
.biz
.net

Feel free to add other address types.

This program should not use a loop. You can write the code with if..else statements.

Hint: check out the endsWith() method of the String class.

Suggested Pseudocode

declare a String vairable for user input

get a web address (URL) from the user

if user input ends with .com

display "Business" message

else

if user input ends with .net

display "Network" message

else

if ... // you need to test for each possible case. The if..else if..else structure will exit once you get a match

Reference no: EM13165115

Questions Cloud

The ford pinto case : Review “The Ford Pinto Case” in Chapter 8 and discuss whether tort or wrong-doing was committed. Explain your rationale.
How many grams of water were in the sample : A 49g piece of ice at 0 degrees C is added to a sample of water at 9 degrees C. All of the ice melts and the temperature of the water decreases to 0 degrees C.
Determine the best sales mix and rank the services : Determine the best sales mix and Rank the services offered in order of their profitability and what additional amount of total contribution margin would be generated if your recommendation is accepted?
Hip-hop culture similar cultural phenomenon : Explain the appeal of Harlem’s nightlife to whites, especially during Prohibition. Discuss whether you consider the cross-over appeal of Hip-Hop culture a similar cultural phenomenon today.
Java test program : Write a Java test program, all your code should be in the main method, that determines what type of organization is indicated by a web address. Your program should allow the user to enter a web address
Program that converts the temperature : Write a program that converts the temperature F in Farenheit to C in Celsius using C = (F-32)*5/9. For ease of programming you can display the result in fractions
Add details to the design of a file system and implement it : add details to the design of a file system and implement it in detail. The file system uses a variant of the scheme used by UNIX in that it allows for a hierarchical file directory and uses pointers to individual blocks of data. The disk used has 100..
State the most common error students make during a titration : The most common error students make during a titration is that they add extra NaOH past the endpoint causing the solution to change a dark pink color.
Calculate the loses frequency of that can ionize : an energy of 353 kJ/mol is required to cause a Mg atom on a metal surface to lose an electron. calculate the loses frequency of that can ionize a Mg atom.

Reviews

Write a Review

JAVA Programming Questions & Answers

  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.

  Record managing system application

Build a student record managing system application

  Create four classes

Create four classes: Account.java, Checking.java, Savings.java, and AccountArray.java.

  Lambert''s vacation rentals

Write an application for Lambert's Vacation Rentals. Use separate ButtonGroups to allow a client to select one of three locations, the number of bedrooms

  Write a class that implements an ordered list of strings

In this problem you will write a class that implements an ordered list of Strings.

  Wrappershallow and wrapperdeep

Each class is simply a wrapper class to hold a private array variable. int [] a; The default constructor for each class should initialize â??aâ??. Each class should have a toString() and equals(). Each class should have a setArray method that allows ..

  Write methods in java

1. int countVowels (String s) That for a given string s, return number of vowels in s.

  Write a program that prompts the user to enter an integer

Using && and || write a program that prompts the user to enter an integer and determine whether it is: Evenly divisible by 5 AND 6.

  Write an interface for a bagadt that implements iterable

Write an interface for a BagADT that implements the Iterable interface. Include javadoc comments that will generate specifications for the BagADT so that someone who wants to implement this interface will know what each method does.

  Menu based program to maintain student records

Write a menu based program to maintain student records. Your program should take the following inputs: 1. Student first name (max. 20 characters) 2. Student last name, (max. 20 characters) 3. Student scores (float/double), eg. 85.4 Problem

  Creates an array named odds

Write code that creates an array named odds and stores all odd numbers between -6 and 38 into it using a loop. Make the array's size exactly large enough to store the numbers.

  Development of a simple program involving multiple classes

Development of a Simple Program Involving Multiple Classes and development of a basic Class, development of the Country and World classes

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