Analyzes an arbitrary number of strings

Assignment Help Business Management
Reference no: EM132249002

Your task is to write methods in JAVA for a program that analyzes an arbitrary number of strings passed as arguments on the command line. Like with many large projects, some of the code has been written for you, and you are not allowed to change it. Instead, you are constrained to filling in certain methods, that must operate to fulfill not only individual-method unit tests, but tests that cover larger swaths of code.

As an example, consider that a user calls the program from the terminal without any arguments:

$ java edu.wit.cs.comp1050.PA3a

Please supply at least one argument at the command line.

That is, you will be writing verification that there is at least one argument supplied! Now let's consider a valid example:

$ java edu.wit.cs.comp1050.PA3a hello world!

Arguments (2, no duplication): hello world!

Length: total=11, avg=6

Shortest (5): <hello>

Longest (6): <world!>

Average (6): <world!>

Now you can see the program in action, but perhaps not all the pieces, so another:

$ java edu.wit.cs.comp1050.PA3a I see a little silhouetto of a man Scaramouche Scaramouche will you do the Fandango Thunderbolt and lightning very very fright'ning me

Arguments (22, has duplication): I see a little silhouetto of a man Scaramouche Scaramouche will you do the Fandango Thunderbolt and lightning very very fright'ning me

Length: total=113, avg=5

Shortest (1): first=<I>, last=<a>

Longest (11): first=<Scaramouche>, last=<fright'ning>

Average (5): none

The program produces outputs that counts the overall and average length (rounded to the nearest integer), checks for duplication, and outputs the first and last arguments that have the shortest, longest, and average lengths.

The following methods have been implemented completely, and you are NOT to change them:

  • main: validates input, produces program output
  • firstOfLength/lastOfLength: call a common utility method (that you WILL implement) to find an element of a particular length
  • firstLongestElement/lastLongestElement: call a common utility method (that you WILL implement) to find the longest element
  • firstShortestElement/lastShortestElement: call a common utility method (that you WILL implement) to find the shortest element

The remaining methods must be implemented by you, as guided by the Javadoc and JUnit tests.

Reference no: EM132249002

Questions Cloud

Different cryprtographic schemes and algorithms : What are the different methods used to exchange and distribute the keys involved in the different cryprtographic schemes and algorithms. Explain each
Determine the cardinality ratio for intuitive relationship : Determine the cardinality ratio for each intuitive relationship shown below, Example Answers: (1:1), (1,M), (M,1), (M,N) and explain why:
Create html documents : An HTML document that displays the numbers 1 - 10, each number being a different color.
How a professional can proactively approach career changes : Evaluate the effect of attitude, personality, and goal setting on work performance development.
Analyzes an arbitrary number of strings : Your task is to write methods in JAVA for a program that analyzes an arbitrary number of strings passed as arguments on the command line.
What would you recommend calvin do : Calvin Cabello is a new production analyst at Red Duv Aviation, in the division of the company that manufactures three parts used in small airplane engines.
Develop a business plan for durango manufacturing company : ACC 599 - Create an argument that you will present to the CEO that suggests accounting and financial management knowledge and skills will be essential
Compose a two paragraph description of hashing : Compose a two paragraph description of hashing that a non-technical user could understand.
What cost-volume relationships should paulsen take : What cost-volume relationships should Paulsen take into consideration for the original price and the proposed new selling price?

Reviews

Write a Review

Business Management Questions & Answers

  Market equilibrium in the education market

Are there any impacts from the pricing ceiling market equilibrium in the education market.

  Discuss the different types of product placement

Discuss the different types of product placement, and determine which products are more used in these types of communication.

  Strategic management concepts

Please explain, at least two strategic management concepts you learned during these six weeks -and what did you learn from these concepts?

  Fast food industry using mcdonald''s

Using the fours I's-issues, institutions, interests and information-that characterize the nonmarket environment, develop an analysis of the fast food industry using McDonald's as your primary focus.

  Production cost report if a company pays a pat

According to explanations offered on the Help screens for the Production Cost Report if a company pays a PAT member a $25,000 annual compensation package utilizes no overtime employs 200 PATs

  What was the hardest to grasp and explain why

Illustrate what is the most practical and easily applied lesson you learned? Illustrate what was the hardest to grasp? Explain why? Illustrate what else do you need to know about Entrepreneurship?

  Explain the organization and purpose of chaebols

Identify the positive and negative characteristics of chaebols for both local and global economy. Also, explain the role they play in the South Korean economy.

  Explain a breakdown of procurement process for organization

Explain a breakdown of procurement process for this kind of organization. How procurement process for your organization differs from its commercial counterpart.

  Maintaining long-term professional relationships

One of the most important aspects of negotiating with someone or a business that you have a long-term and on-going relationship with is maintaining that relationship post-negotiation. Consider the following negotiation:

  Element of the integers

Let A = Z x Z (where Z is the set of all integers) and B = {2k : k is an element of the integers}. Show that f: A --> B  via the assignment f(m,n) = 20n +6m a) defines a function

  What are business ethics

What are business ethics? What are some examples of unethical behavior within an organization? How is HRM involved in business ethics?

  Common sources of reimbursement for skilled nursing

What are the common sources of reimbursement for skilled nursing? What effect might these have on care? What resources can be used to select an appropriate facility? How can people find these sources?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd