Question
Name Search.(do not use break or continue statement) Download the text le names.txt attached below. It contains a list of 65 female rst names in
Name Search.(do not use break or continue statement) Download the text le names.txt attached below. It contains a list of 65 female rst names in upper case letters. In Eclipse, insert this file into your Java project folder.
Implement two static methods:
- stringSort: It will sort the String array provided as an argument using one of the sorting algorithms presented in class (selection or insertion).
- stringSearch: It will search the String array provided as its first argument for the String value provided as its second argument using the binary search algorithm presented in class.
The main method reads the 65 names from the file names.txt and inserts each one into an array. This array is then sorted using the stringSort method. The stringSearch method is then used to search for different names inputed by the user.
the context in the file is as followings
MARY PATRICIA LINDA BARBARA ELIZABETH JENNIFER MARIA SUSAN MARGARET DOROTHY LISA NANCY KAREN BETTY HELEN SANDRA DONNA CAROL RUTH SHARON MICHELLE LAURA SARAH KIMBERLY DEBORAH JESSICA SHIRLEY CYNTHIA ANGELA MELISSA BRENDA AMY ANNA REBECCA VIRGINIA KATHLEEN PAMELA MARTHA DEBRA AMANDA STEPHANIE CAROLYN CHRISTINE MARIE JANET CATHERINE FRANCES ANN JOYCE DIANE ALICE JULIE HEATHER TERESA DORIS GLORIA EVELYN JEAN CHERYL MILDRED KATHERINE JOAN ASHLEY JUDITH ROSE
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