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

  Produce a design document

You will design and deliver a website foes fictional client part-1 Website Design Document and produce a design document

  Create java application which creates random phone number

Create and implement Java application which creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output.

  Design a course registration system

Create an application which represents a simplified course registration system using ArrayLists and HashMaps.

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Create a circle class

create acircle class, which has one field, the radius. the class should contains two constructors: a no-argument constructor that set the radius to zero, and a constructor that takes a parameter to set the radius.

  If there are 4 command line arguments

If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen)

  Java program to compute invoice for client

You need a java program to compute the invoice for client and then print out invoice to the screen. The consulting rate is $200 per hour.

  Have to implement a search algorithm

Suppose you have to implement a search algorithm in a high programming language such as Java or C++. You are given a linked list that is not sorted and it's rather small, in the order of a few dozen elements.

  Java applet to find how much federal tax we need to pay

Write a java applet to determine how much federal tax we need to pay assuming the tax rate is 12%.  Ask the taxable income.

  Modify the scholarship application

Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.

  Sorting routine adopted in the java api for arrays.sort()?

What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.

  Multiplexors whose control bit allows you

Design a 4-bit up/down counter that has 2 to 1 multiplexors whose control bit allows you to select between one of two counting modes up or down

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