Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java question I'm writing a program to prompt user to enter a paragraph and the specific word that they want to censor and eventually output

Java question

I'm writing a program to prompt user to enter a paragraph and the specific word that they want to censor and eventually output the censored paragraph. How to write a program without using array? Also, space, period, quiestion mark, comma or exclamtion point could be censored.

For example:

Paragraph: I scream, you scream, we all scream for ice cream!

word needed to be censored with *: "we all scream for ice cream"

Output: I scream, you scream, XXXXXXXXXXXXXXXXXXXXXXXXXXX!

image text in transcribed

import java.util.Scanner; public class Random public static void main(String[ args) f Scanner input = new Scanner(System.in); System.out.println( "Please enter the paragraph you would like filtered: "); String paragraph input.nextLine); System.out.println ("Please enter the word you would like to filter: "); String word -input.nextLine); System.out.println("Unfiltered:"paragraph); for(int i0; i

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

Students also viewed these Databases questions