Program that allows the user to enter an unknown number

Assignment Help JAVA Programming
Reference no: EM13705119

Question: Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.

An example :

witness my exciting first use of vectors!

Enter as many letter as you like, enter ! to quit.

enter a letter: b

enter a letter: u

enter a letter: r

enter a letter: r

enter a letter: p

enter a letter: !

Great! You entered: burrp

The first character is : b

The last character is : p

Note: the exclamation point was never stored in the vector.

Goal: recognize that vector objects allow greater flexibility that arrays and how to use a vector in a program.

You have to find that vector objects allow greater flexibility and how to use a vector. You do not need to identify size when using vectors.

Reference no: EM13705119

Questions Cloud

Front-end and back-end validation : What are the advantages and disadvantages of front-end and back-end validation and in which specific situations would one technique of validation be preferred over the other?
Determine the limiting reactant for the reaction : Problem- Magnesium oxide can be made by heating magnesium metal in the presence of the oxygen. The balanced equation for the reaction is 2Mg(s) + O2(g) ? 2MgO(s).
How many moles of water are produced in the reaction : Problem- The octane rating of gasoline is a relationship of the burning efficiency of the given gasoline mixture to the burning efficiency of octane (C8H18). (Figure 1) Like most hydrocarbons, octane reacts with oxygen gas to produce carbon dioxid..
Write programs that read a line of input : Write programs that read a line of input as a string and input
Program that allows the user to enter an unknown number : Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.
Explain the critical pressure and critical temperature : Problem- Which of the following statements are incorrect? 1. A liquid boils when its vapor pressure is equal to the pressure above its surface. 2. Above the critical pressure and critical temperature, only the solid phase of a pure substance can e..
How many processes a computer can efficiently support : Show the factors that you think would limit how many processes a computer can efficiently support?
What is the radius of the aluminum atoms : Problem- Aluminum has a density of 2.699 g/cm3. The atoms are packed in a face-centered cubic crystal lattice. What is the radius of the aluminum atoms
How many transactions could the server process : How many transactions/second could the server process if it had 2 threads?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Method that accepts a string object

Word Counter Write a method that accepts a String object as an argument and returns the number of words it contains. For instance, if the argument is "Four score and seven years ago" the method should return the number

  Palindrome by doing character replacement

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement.

  Write down java console application to add new student

Write down java console application presents the following menu. Add new student and scores in Biology, Physics and chemistry Search for a given student.

  Allows the user to enter a temperature and whether

Write a program that allows the user to enter a temperature and whether the temperature is stated in Celsius or Fahrenheit...or whethe

  Create a gui client side application that is a java version

q1. create a gui client side application that is a java version of notepad giving the ability to open modify and save

  There are different ways you can use virtulazation one

write a 200- to 300-word short-answer response to the following there are different ways you can use virtulazation. one

  Write a java program in a netbeans project that reads a

write a java program in a netbeans project that reads a text file containing the names and addresses of several people

  Program that simulates the rolling of a single die1000 times

Write a program that simulates the rolling of a single die 1000 times. The program must use an array of size 6 and not 1000 to store the occurrences of each side or face on the six-sided die. The program should output the particular die face and the ..

  Mean and standard deviationwrite a program that reads a set

mean and standard deviation.write a program that reads a set of floating-point data values from the input. when the

  Each purchase contains an invoice number amount of sale

Create a class named Purchase. Each Purchase contains an invoice number, amount of sale, and amount of sales tax. Include set methods for the invoice number and sale amount.

  Rewrite this code in order to ask the user for input

rewrite this code in order to ask the user for input and then coverth it from infex to postfix ,, so i want to put a Scanner and this ask the user for input .. how to do it ?

  Create a 2-by-3 two-dimensional array of integers

Create a 2-by-3 two-dimensional array of integers and fill it with data. Loop through the array and locate the smallest value stored.

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