subject

/** * Write a description of class unique here. * * @author Qi Zhu * @version (a version number or a date) */ import java. util. Scanner; public class unique { public static void main( String args[]) { Scanner input = new Scanner( System. in ); // To do 1: create an array of five elements int count = 0; // number of uniques read int entered =0; // number of entered numbers while (entered < numbers. length ) { System. out. print("Enter a number: "); // To do 2: write the code to retrieve the input from user //validate the input // To do 3: write if statement that validates the input [10, 100] if () { // flags where this number already exists boolean containsNumber = false; //increment number of entered numbers entered++; /* To do 4: Compare the user input to the unique numbers in the array * using a for statement. If the number is unique, continue */ // add input to the array only if the number is not already if (!containsNumber) { // To do 5: write code to add the number to the array and increment unique items input } // end if else System. out. printf("%d has already been entered\n", number); } // end if else System. out. println("Number must be between 10 and 100"); // print the list of unique values // To do 6: Write a for loop to output unique values }// end while } // end class Unique }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Word vocabulary words: print, proofread, status line, graphics, font effects, left margin, justification, line spacing, copy/paste, data. review words: font point, bold, save, center, error. fill in the correct word for the definition and then transfer the letters to the appropriate spot by number. some numbers will be found multiple times. you will end up with a quotation aboutโ€ฆโ€ฆ what else? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 k 16 17 18 19 20 21 22 23 24 25 8 27 28 29 w 31 32 k 34 35 36 w h 39 40 41 42 8 44 45 46 47 48 49 50 51 52 53 54 55 .1. a software function that records keystrokes on a disk or drive so information can be 5 4 52 9 later retrieved. p n 2. to produce a paper copy of information. 10 7 12u n 3. a display that shows the location of the cursor, pages, etc. 45 46 18 27 36 20 42p4. pictures or images, located in clip art or other files. 6 24 44 28 34 49 555. any mis-stroke of a key. 47 41 48 2 10 n6. allows major changes to the font such as shadow, emboss, etc. 21 25 46 35 23 21 29 14 22 17 n7. a feature that centers lines of text horizontally. 49 53 46 9 51 p8. size of the font 31 16 22 b l 9. a feature that prints designated text darker than the rest to add emphasis. 32 3 . p10. to compare copy on a display screen or printout to the original 24 39 25 23 54 9 50 3 and correct errors. j un 11. a feature that allows text to be aligned at the left 11 12 7 21 16 49 40 46 34 2 and right margins. leftn 12. amount of blank space on the left side of the paper. 8 18 41 6 34 linen 13. number of blank lines between lines of text. 17 4 49 13 1914. any information inputted into the computer. 3 4 46 44 p /p15. feature that duplicates text from one location and places it in another.
Answers: 2
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
You know the right answer?
/** * Write a description of class unique here. * * @author Qi Zhu * @version (a version number or a...
Questions
question
Arts, 02.02.2021 18:40
question
World Languages, 02.02.2021 18:40
question
Mathematics, 02.02.2021 18:40
Questions on the website: 13722367