Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Design a driver class called YourNameAssignment 1 ( replace YourName with your actual name ) with the following exactmethods ( with exact 1

1. Design a driver class called YourNameAssignment1(replace YourName with your actual name) with the following exactmethods (with exact1 names and functionality; replace YourName with your actual name or the name you go by, no spaces):YourNameRecursion: A recursive method (using recursion studied in Chapter 18) that receives a string Concept as a parameterand recursively capitalizes each character in the string Concept (change a small cap to a large cap, e.g. ato A, b to B, etc) using the following recursive approach:1. capitalize the first letter of the Concept (base case),2. call the method recursively for the remainder of the string (reduction) and3. build the capitalized string from the capitalized first letter and the capitalized remainder of the string.For example, if the Concept is java, the method will capitalize the first letter to J(base case), call themethod recursively for the reminder of the string ava (reduction), and after recursion/reduction is overand returns AVA, the method should build a new string from J and AVA (JAVA) and return it.Do not use predefined methods to capitalize the Word or other approaches.YourNameCreateList: A method that reads concepts/words from the Assingment1DataFile.txt file and store them into a List,Stack, or Queue data structure called YourNameList (any type of lists, queues, or stacks introduced inChapter 20- use your knowledge of the chapter and problem at hand to decide which one is better). Theconcepts are delimited by whitespaces, punctuation marks (comma, period, colon, semi-colon,exclamation mark, question mark, quotation marks, slash, etc.), parentheses, and other symbols. Do notuse -,+, and # as delimiters, since they are going to be part of concepts (e.g. Objective-C andC++, and C#). Capitalize each concept using the YourNameRecursion method before adding it to theYourNameList. Print the message LIST: on a separate line and all the elements fromYourNameList one element per line.YourNameCreateSet: A method that processes each element/concept from YourNameList and add the unique capitalizedwords to a Set data structure called YourNameSet (any type of sets introduced in Chapter 21- use yourknowledge of the chapter and problem at hand to decide which one is better). Print the message SET: on a separate line and all the elements from YourNameSet one element per line.YourNameCreateMap: A method that processes each element from the YourNameSet, and for each element fromYourNameSet counts how many times that element occur in the YourNameList (e.g. for JAVA it willcount how many times the word JAVA is in the YourNameList and store the CONCEPT-OCCURRENCE pairsinto an ordered map data structure called YourNameMap (any type of map introduced in Chapter 21- useyour knowledge of the chapter and problem at hand to decide which type is better for this particularproblem). Print the message MAP: on a separate line and all the elements from YourNameMap oneelement/CONCEPT-OCCURRENCE pair per line.YourNameAssignment1main method: The driver class main should call the methods above in this order: Use the YourNameCreateList method to create the YourNameList list. Use the YourNameCreateSet method to create to capitalize YourNameList list and createYourNameSet set. Use the YourNameCreateMap method to create the YourNameMap map and print it.Your code should just call the method and not reimplement the code from the methods above. Do notimprove the code and remove the requested functionality above. Use parameters and returned values topass structures between different method calls2. Implement the class in NetBeans IDE and JAVA: Create a JAVA project called YourNameAssignment1(same name as the driverclass) and add your code to YourNameAssignmen1 project/driver class. Your program should be user-friendly (prompt the user forthe input using a descriptive message like Please enter your pets age or Please enter an integral number representing your petsage: ) and be well-documented/commented (have comments for every line of code).

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_2

Step: 3

blur-text-image_3

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions