1. Engineering
  2. Computer Science
  3. java programming...

Question: java programming...

Question details
Java programming
onal Web Pag enerator as Write a program that asks the user for his or her name, and then asks the user to enter a sentence that describes him or herself. Here is an example of the programs screen: Enter your name: John Doe[Enter] Describe yourself: I am a computer science major, a member of the Wooz club, and I hope to work as a mobile app developer after I graduate from University.[Enterl Once the user has entered the required input, the program should create an HTML file, containing the input, for a simple Web page. Here is an example of the HTMIL content, using the sample input previously shown. The output file should have the html extension insteady of.txt html> head>title> My Simple Web Page </title><head> <body> hl style-text-align:center> John Doe <hl> <p style=text-align:center><p> I am a computer science major, a member of the Woozy club, and I hope to work as a mobile app developer after I graduate from University. </bx/p> /body </html>
2 of 2 Task 2 (using the ArrayList class) Add a new class the current project and name it MyArrayList. In that class, add an instance variable, which is an ArrayList of integers. Use a constructor to populate the array list with numbers from a data file. Create a text file at the root of your project folder and then add 5 numbers to this file (one number per file). Use this file to populate the arraylist. Task 2 (using the ArrayList class) To the class you created in Task 2, add a method named reverseList0 that creates and returns an ArrayList which is the reverse of the original ArrayList. For example, if the original list was [2,4, -2, 5, 3, 0,7], the output from this method would be the list 17, 0, 3, 5,-2, 4, 2]. Task 3 (using the ArrayList class) To the same class from Task 2, add a method called makeCopies. This method will replace every integer k with k copies of itself. For example, if the list is: [2 4, -2, 5,3, 0, 7] before the method is invoked, it should be [2, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7] after calling the method makeCopies. A negative value, or a 0 value, means that the value should be removed from the list. Test your method using the following list: [2, 4, -2, 5, 3,0,7,5]
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution