Modify the following given Java program. You are expected to modify the supplied Exercise1.java to print just the last lines of each paragraph in HTML format. Copy and paste the Sample input on the console then print the Expected output.
import java.util.Scanner;
public class Exercise1 {
/** A simple static string for HTML & table header. */
private static final String HTMLHeader =
"<!DOCTYPE html>\n"
+ " <html>\n"
+ " <head>\n"
+ " <title>CSE: Exercise 1</title>\n"
+ " </head>\n"
+ " <body>\n"
+ " <table border=1>";
/** A simple static string to print HMTL footer. */
private static final String HTMLFooter =
" </table>\n"
+ " </body>\n"
+ "</html>
public static void main(String[] args) {
System.out.println(HTMLHeader);
Scanner keyboard = new Scanner(System.in);
while (keyboard.hasNextLine()) {
String line = keyboard.nextLine();
System.out.println(" <tr><td>" + line +
"</td></tr>");
}
System.out.println(HTMLFooter);
}
}
Sample input:
para #1
welcome.
para #2: Introduction
This is a simple test line
to create a 2 line para
conclusion of inputs
This para is the last para.
It has 3 lines
3 lines including this one and 3 blank lines at end
Last paragraph with 1 line
Expected output:
<!DOCTYPE html>
<html>
<head>
<title>CSE: Exercise 1</title>
</head>
<body>
<table border=1>
<tr><td>welcome. </td></tr>
<tr><td>to create a 2 line para</td></tr>
<tr><td>3 lines including this one and 3 blank lines at end</td></tr>
<tr><td>Last paragraph with 1 line</td></tr>
</table>
</body>
</html>
Code: I am not able to post the code(because of html syntax in it), HomeworkLib is not allowing so I am pasting the screenshot of the code

Output:

Modify the following given Java program. You are expected to modify the supplied Exercise1.java to print...
HTML/CSS: Modify the table you created in hands-on exercise 8.1 to be centered on the page, use a background color of #CCCC99, and display text in arial or the browser default sans-serif font. Configure this table using CSS instead of obsolete HTML attributes. Place an e-mail link to yourself on the web page. Save the file as mytable.html. HERE IS THE CODE FOR 8.1: <!DOCTYPE html> <html lang="en"> <head> <title>Practice with Tables</title> <meta charset="utf-8"> </head> <body> <table border="1" > <caption>School...
CS 602 Server Side development hw1c please explain and comment the following html code <b>Employees with Last Name {{name}}</b> <hr/> <table border=1> <tr><th>Id</th><th>First Name</th><th>Last Name</th></tr> {{#each employees}} <tr> <td>{{this.id}}</td> <td>{{this.firstName}}</td> <td>{{this.lastName}}</td> <tr> {{/each}} </table> part two <!doctype html> <html> <head> <title>CS602 HW2</title> </head> <body> <header> <img src="/images/bu-logo.gif" alt="logo"> </header> <h3>CS602 HW2 - Your Name</h3> <a href="/addEmployee">Add Employee</a> <hr/> {{{body}}} </body>...
Convert attached servlet file to use ArrayList instead of using Enumeration string array. import java.io.*; import javax.servlet.*; import javax.servlet.annotation.*; import javax.servlet.http.*; import java.util.*; @WebServlet("/show-params") public class ShowParameters extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n"; String title = "Reading All Request Parameters"; out.println(docType + "<HTML>\n" + "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" + "<BODY BGCOLOR=\"#FDF5E6\">\n" + "<H1 ALIGN=CENTER>"...
How do I make these sheets into three different tabs for one website? This is all using HTML. - Chade's Bicycle Company <!DOCTYPE html> <html> <head> <img src="Chade'sLogo.png"> </head> <body bgcolor= "white"> <center> Welcome to Chade's Bicycle Company!</center> <center> We aim towards making our customers happy. </center> <br> <center> Chade's Bicycle Company </center> <center>2900 Bicycle Ave.</center> <center>Seattle, Washington</center> <center>98101</center> <br> <center><img src="HappyCustomer.png" alt="Satisfied customers"></center> <br> <p align="right">Our mission statement:</p> <p align="right">Bicycles have always been a </p> <p align="right">positive part of...
Look at the following illustrated output for an HTML and
a css given below
<!DOCTYPE html>
<head>
<title>TABLE with STYLE
SHEET</title>
<meta charset="utf-8" />
<meta name="description" content="Godaddy Webpage
original" />
<link rel = "stylesheet"
href="GoDaddy_assignment_1.css">
<body>
<img src= "GoDaddy.png"/>
<p>Welcome
to:<strong>webhamster.com</strong></br>
This web page is
parked<strong>Free</strong>courtesy of
<a class="aclass1" href
="https://www.godaddy.com">GoDaddy.com</a></p>
<h1>Want to buy<span class
="span2">webmaster.com ?</span></h1>
<div class ="div1">
<a class ="aclass2"
href="https://www.godaddy.com">Learn How</a>
</div>
</hr>
<button>Search Ads</button>
</body>
</html>
“
QUESTION continued Given the corresponding css
file
.aclass1{color:purple;}...
i'm having trouble with 1 and 3 using html, javascript and jquery 1) Change the "Search" link on the left to a button that when clicked, hide all the fields on the form and display the text "This is a search feature..." 3) When the user fills the form and clicks "Login", the values inputted should be displayed in the empty row (under Login) of the page. The display should be in the form: Student ID: <input value> Student Name:...
Assignment Recall the W3 Schools website JavaScript example on the following topics from last assignment for this problem (http://www.w3schools.com/js/default.asp): · JS Home · JS Introduction · JS Where To · JS Output · JS Syntax · JS Statements · JS Comments · JS Variables · JS Operators · JS Arithmetic · JS Assignment Additionally, review the W3 Schools website JavaScript examples on the following topics: · JS Data Types · JS Functions · JS Where To · JS Objects ·...
You will write a single java program called MadLibs. java. This file will hold and allow access to the values needed to handle the details for a "MadLibs" game. This class will not contain a maino method. It will not ask the user for any input, nor will it display (via System.out.print/In()) information to the user. The job of this class is to manage information, not to interact with the user.I am providing a MadLibsDriver.java e^{*} program that you can...
Modify the program that you wrote for the last exercise in a file named Baseball9.java that uses the Player class stored within an array. The program should read data from the file baseball.txt for input. The Player class should once again be stored in a file named Player.java, however Baseball9.java is the only file that you need to modify for this assignment. Once all of the input data from the file is stored in the array, code and invoke a...
java
Fill in the blanks to complete the following recursive program. It shou print a pattern like the one below. using System.out.println. Assume you have method String nspaces(n) which returns a string containing n spaces. You should not write nspaces.) The pattern below is of size 3. The first line has one space before the while the middle line has 3 spaces before the .. The program should work for any positive size. 3 public static gt ( if( }...