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

  Write a program that shows the current time and date

Write a program that shows the current time and date

  Client server chat system

Threading and GUI design using Java's network library, threading system, and swing user interlace libraries to implement a basic chat client and saver system. Thc system will allow multiple. remote users to send and receive messages across the net..

  The objective is to implement a menu-based system

The objective is to implement a menu-based system for Bank Accounts in order to simulate a very simple banking system. Many structures have to be declared to manage bank accounts.

  Java code using jframe

Write a Java code using JFrame. This code needs to manipulate 4 shapes(2 rectangles and 2 squares) in a 400x400 JFrame. This needs to manipulate the shapes in 3 different ways, using 3 different methods. One for translating a shape, one for proportio..

  Java program to store temperatures in two-dimensional array

Write the Java program which uses two-dimensional array to store highest and lowest temperatures for each month of the year. Program must output average high,average low,

  Write ijvm program to multiply two hexadecimal numbers

Write the IJVM program that multiplies two (hexadecimal) numbers. The user inputs the hex numbers and the result is printed out. The program then accepts another pair of numbers.

  Java program to decide whether integer is perfect number

For example, 6 is a perfect number because 6 = 1 + 2 + 3. Write a Java program that decides whether integer is a perfect number.

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  Write various bindings to determine semantics

Write the various bindings that are required to determine the semantics when statement is executed. For each binding, indicate binding time used for language. Describe your answer.

  Method called printpowersof2 that accepts a maximum number

Write a method called printPowersOf2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. For example, consider the following calls: printPowersOf2(3); printPowersOf2(10)

  Give at least one constructor without any parameter

We learned as popular Set implementation. Write own TreeSet class that implements following interface: You are to give at least one constructor without any parameter.

  Write an algorithm for fining the middle node

Write an algorithm for fining the middle node of a doubly linked list given both the head and the tail of the list.And Write a  recursive  java function that counts the number of nodes in a circularly linked list.

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