Question
Assignment 6.2: Catchy Headlines (10 pts) With so many competing news sources onf the internet, newspaper and magazine publishers need catchy headlines to attract the
Assignment 6.2: Catchy Headlines (10 pts)
- With so many competing news sources onf the internet, newspaper and magazine publishers need catchy headlines to attract the attention of readers.
- In this assignment, you will write a program to produce suggested headlines based on a topic selected by the user.
- Write a program that produces the following five (5) headlines based on user input of a topic and number:
[number] Secrets That Experts Of [topic] Want You To Know! [number] Reasons [topic] Will Change The Way You Think About Everything! You Will Never Believe This Awesome Truth Behind [topic] Here's What No One Tells You About [topic] [number] Ways [topic] Can Help You Live To 100!
- The name of the source code file for this program must be Headlines.java (note the capitalization of the H in Headlines).
- Be careful of the spelling, including capitalization, as you will lose points for a misspelled name. Naming is important in programming.
- Ask the user for the following inputs (and no other input) in this order:
- Single word topic
- Integer number between 3 and 20
- Assume the user only enters correct data.
- The words [topic] and [number] (shown in square brackets above for emphasis) must be replaced by the user input.
Sample Output:
Enter a single-word topic: Java
Enter an integer number between 3 and 20: 10
Suggested blog titles: 10 Secrets That Experts Of Java Want You To Know!
10 Reasons Java Will Change The Way You Think About Everything!
You Will Never Believe This Awesome Truth Behind Java
Here's What No One Tells You About Java
10 Ways Java Can Help You Live To 100!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started