Writing string methods

Posted on 2003-03-04
Medium Priority
Last Modified: 2010-04-17
i have been tryin to write these methods but have been unable to do them at all please see if u can do these and email me thankx a lot

public static String[] grow(String[] small, double factor) – This method returns an array of Strings storing the identical Strings and in the same order as those contained in the array of Strings small, however, the length of the returned array of Strings is (factor * small.length).  Factor must be >= 1.0.


public static boolean add(String[] set, String str) – This adds the String str to the array of Strings set if set contains no String equal to str.  Returns true if the String str was added, false otherwise.


public static void selectionSort(String[] s) – This method sorts the Strings contained in the array of strings s lexicographically.


public static void print(String[] s) – This method prints the Strings contained in the array of Strings s to the display with a space between each String.  A new line follows the last String.


public static void copy(String[] from, String[] to) – This method copies the Strings contained in the array of Strings from into the array of Strings to.  If array to is smaller than array from only the first to.length Strings will be copied into the array to.

Question by:sami1983
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Exceter earned 100 total points
ID: 8068488
>> ...please see if u can do these and email me thankx a lot

I think not...

It is a direct violation of the EE membership agreement for experts to complete homework assignments.


Expert Comment

ID: 8085140
Sami, are you really serious.Think about your future possitively and do your homework.

Author Comment

ID: 8096061
listen by the way i alreayd have done the methods...i was gettin a couple errors and therefore i wanted to compare

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question