Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert the java code to C++ code here is java code Requirements (almost the same as previous homework except no command-line args) Assume one-or-more empty

Convert the java code to C++ code

image text in transcribedimage text in transcribedhere is java code

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Requirements (almost the same as previous homework except no command-line args) Assume one-or-more empty lines separate paragraphs in a text file. The last paragraph may not have trailing blank lines. This homework requires you to develop a C++ program process line- by-line from standard input (std::cin) and Required base case [7 points: Print the first and last line (if different) of a paragraph in a given HTML format. Note that if first and last line is identical (i.e., a paragraph has only 1 line) then print just the first line. Read input from std::cin, do not use files This is the base case (or minimal) requirement to earn any points for this homework. Optional [8 points]: Print count of words and valid English words in each paragraph. If you don't implement this functionality then just print 0 (zeros) for the two word counts and ignore the errors reported by the CODE plug-in. . Sample inputs and outputs The command-line arguments to use are shown as part of the running the C++ program below. In the output, each line is indented by 2 blank spaces. The HTML tags are highlighted just for visual convenience. You should view base case.txt and us const amendments.txt in a text editor to understand their contents. Base case Note that word count implementation is not necessary for base case, but the output below shows the expected word counts. The use of less-than ( First and last lineWord counts/tr> line of first Second para 1ine 1 Second para line 2K/tdXtd>Words English words: A one line third paragraphWords: 5 English words: 5 paragraphWords 32 English words: 32K/tdXtr> 4 Thi aracrai going to have 5 line. Line 1 o 5 This paracraph is coing to have 5 lines. Line 5 of 5Words: 60 line This s the last, 1 paragraph this file. Words: 10 English in words: K/tdXtr>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago