Write a java application program called largest.java

Assignment Help JAVA Programming
Reference no: EM13765394

Control Structures and User-Defined Methods:

Program files for each of the following three programs.

1. Largest
2. Palindrome
3. Diamond

Step 1: Largest

Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers. Except main() method, no other user-defined method is required. Your program should use at least the following three variables

1. counter: A counter to count to 10 (that is, to keep track of how many numbers have been input and to determine when all 10 numbers have been processed);

2. number: The current digit input to the program; and

3. largest: The largest number found so far.

Step 2: Palindrome

A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user to enter in a five-digit integer and determines whether it is a palindrome. If the number is not five digits long, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value.

Your program will have the following four methods

1. main() method, which controls the execution of the program;
2. retrieveInput() method, which prompts and retrieves the input values;
3. check() method, which determines whether it is a palindrome; and
4. display() method, which displays the result.

Step 3: Diamond

Write a program called Diamond.java that uses a method diamondOfAsterisks() that displays a diamond (the row number of a diamond must be odd) of asterisks whose row is specified in an integer parameter row. For example, if the user enters a 7, then the diamond will have seven rows and the method will display the pattern of asterisks. Below is an example of the diamond displayed when 7 is entered.

Reference no: EM13765394

Questions Cloud

Criteria for criminal justice research : Develop a 1,050- to 1,750-word paper addressing what you have learned about criteria for criminal justice research, specifically with regards to what research method is appropriate in your proposal
Role of a project manager for a midsized company : The role of a project manager for a midsized company, suggest three to five ways you would communicate the PMI Code of Ethics to your project team during your weekly status meetings.
Long forward contract on a non-dividend-paying stock : A one-year long forward contract on a non-dividend-paying stock is entered into when the stock price is $40 $38 and the risk-free rate of interest is; 8% per annum with continuous compounding. What are the forward price and the initial value of the f..
Failure of the firm accounting information : Based on the information you researched, assess the failure of the firm's accounting information system to prevent the related fraud / embezzlement.
Write a java application program called largest.java : Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers
Focuses on using a cost-benefit perspective : Rational Choice Theory focuses on using a cost-benefit perspective. Apply this to a specific crime and demonstrate how a criminal would utilize this cost-benefit perspective
Assignment on audit planning and control : It is common industry knowledge that an audit plan provides the specific guidelines auditors must follow when conducting an external audit.
Making annual transfers equal to the gift exclusion : Oscar, aged 70, and Maggie, aged 60, are married and jointly own a personal residence valued at $3,800,000. Oscar also owns stocks valued at $4,700,000; an art collection valued at $1,400,000; a retirement account valued at $900,000 contributions ent..
Write a essay on sir thomas wyatt who so list to hunt : Write a documented essay on Sir Thomas Wyatt, "Whoso List to Hunt".

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Using joptionpanes to handle your input and output

Using JOptionPanes to handle your input and output, produce a Java program which, given three sides of a triangle, determines whether the triangle is.

  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

  Develop parent lock method asks for four digit password

Develop the parent lock method (turns lock on/off) which asks for 4 digit password. Navigating to any channel which is in range 99-110 must ask for password when parent lock is on.

  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.

  1 rock-paper-scissors simplejavaproblems 1-3 are based on

1 rock-paper-scissors simple.javaproblems 1-3 are based on the rock-paper-scissors game. if you are unfamiliar with

  Pass in the number of gallons on board

public float usefulLoad() // this is the grossWeight - emptyWeight public float usefulLoadWithFuel( in gallons ) // this is the useful load - gallons x 6. The programmer user will pass in the number of gallons on board.

  Product ordering system and design

Product Ordering System and Design Document:Select a company and one of its products for which you will be creating an online ordering system. Get your instructor's approval for your selections

  One-dimensional array to solve the

In C#, Use a one-dimensional array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who gros..

  Socket programming in java tcpgoal in this project we will

socket programming in java tcpgoal in this project we will develop a web server in two steps. in the end you will have

  Objective to learn the use of comments and basic math

objective to learn the use of comments and basic math operators.create a new folder called assign21 under

  Please write the code in java nbsprecursionimplement a

please write the code in java nbsprecursionimplement a subsetgenerator that generates all subsets of the characters of

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