Question: Object Oriented Programming in Java Build a program using the requirements in the photos below. Please make sure to complete entire assignment including extra credit

 Object Oriented Programming in Java Build a program using the requirementsin the photos below. Please make sure to complete entire assignment includingextra credit and comments explaining code thank you. Introduction In this homeworkassignment, you will practice - Working with nested for loops - Workingwith 2D arrays - Working with some String methods Prompt You are

Object Oriented Programming in Java

Build a program using the requirements in the photos below.

Please make sure to complete entire assignment including extra credit and comments explaining code thank you.

Introduction In this homework assignment, you will practice - Working with nested for loops - Working with 2D arrays - Working with some String methods Prompt You are given code (in hw2ArrayOnly.java) that create a two-dimensional array of strings and store it in the variable book. The array in book is a 6x2 array. Each of the six rows represents a book chapter and it contains two strings: chapter number/label and chapter content. For example: this is the first row \{"Chapter 1", "In an electronically controlled switch, a positive voltage at the control input allows electricity to flow, while a zero voltage prevents the flow. Such switches were useful, for example, in routing telephone calls." After you create your project and main class, copy the code given to you in hw2ArrayOnly.java into function main.. Your task is to create a program that does the following: - Ask the user for a word as input from the console. - Search the text content of each chapter in book to find an instance of the word that was input. - If the input word in was found in at least one of the chapters, print to the console all the chapters numbers/labels where the input word was found. - If the input word was not found in any chapter, print a message to the console stating that the word was not found in any chapter. - Extra credit: - If the word is found in a chapter, print out 20 characters before the word, and 20 characters after the word, from where the word was found. - If less than 20 characters exist before/after the word, print out as many characters as there exist before/after the word. Notes: - Your program should case insensitive (ignore case). If the user inputs the word "boolean", and the text contains "Boolean", then it should return a match! - Your program should have console outputs labeled appropriately. - Your program shouldn't just print out "Chapter 2" (What does it represent? Print informative output). See sample outputs for further information. - Close the scanner! Enter a string to search for: control The word "control" was found in the following chapters: Chapter 1 Enter a string to search for: type The word "type" was found in the following chapters: Chapter 3 Chapter 4 Enter a string to search for: for The word "for" was found in the following chapters: Chapter 1 Chapter 3 Chapter 5 Chapter 6 Enter a string to search for: object The word "object" was not found in any of the chapters Extra Credit Enter a string to search for: boolean The word "boolean" was found in the following chapters: Chapter 4: e equality or inequality operators evaluates to a Boolean value. A Boolean is a type that has just t Enter a string to search for: for The word "for" was found in the following chapters: Chapter 1: age prevents the flow. Such switches were useful, for example, in routing telephone calls Chapter 3: an int to a double. The compiler automatically performs several common conversions between int and Chapter 5: A for loop is a loop with three parts at the top: a Chapter 6: Iterating through an array for various purposes is an important programming 5 See Grading Criteria on next page Grading Criteria \begin{tabular}{|l|l|} \hline Creating a Java application with main function & 5 \\ \hline Reading user input & 10 \\ \hline Iterating through the array & 15 \\ \hline Identifying whether search word was found or not & 10 \\ \hline Case insensitive search & 10 \\ \hline Display output when a there is a match & 10 \\ \hline Display output when a there is no match & 10 \\ \hline Display match in multiple chapters & 10 \\ \hline Code readability, meaningful variable names, indentation, and use of comments. & 10 \\ \hline Reference and collaborations file & 5 \\ \hline Pushing to main branch & 5 \\ \hline Total & 100 \\ \hline Extra Credit & 10 \\ \hline \end{tabular} were useful, for example, in routing telephone calls." }, \{ "Chapter 2", "When a statement that assigns a variable with a value executes, the processor writes the value into the variable's memory location. value reads the value from the variable's memory location." } \{ "Chapter 3", "A type conversion is a conversion of one data type to another, such as an int to a double. The compiler automatically performs several ommon conversions between int and double types, such automatic conversions are known as implicit conversion." }, ralues: true or false." }, { "Chapter 4", "An expression involving the equality or inequality operators evaluates to a Boolean value. A Boolean is a type that has just two \{ "Chapter 5", "A for loop is a loop with three parts at the top: a loop variable initialization, a loop expression, and a loop variable update. A for oop describes iterating a specific number of times more naturally than a while loop." \}, \{ "Chapter 6", "Iterating through an array for various purposes is an important programming skill to master. The program below computes the sum of an \}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!