CIS

Directions: Please answer the following questions.

 

1.      Write specifications using UML notation for a function that computes the sum of the first five positive integers in an array of narbitrary integers.

2.      What is an abstract data type?

3.      What steps should you take when designing an ADT?

4.      The following function computes the sum of the first n≥ 1 integers. Show how this function satisfies the properties of a recursive function.

5.      Given an integer n> 0, write a recursive function countDown that writes the integers n, n– 1, . . . , 1. Hint:What task can you do and what task can you ask a friend to do for you?

6.      In the previous definition of writeArrayBackward, why does the base case occur when the value of first exceeds the value of last?

7.      Write a recursive function that computes and returns the product of the first n≥ 1 real numbers in an array.

8.      What happens to the array items when the method add cannot add another entry to it, because it is already full?

9.      If a client of ArrayBag creates a bag aBag and a vector v containing five items, what happens to those items after the statement v = aBag.toVector() executes?

10.  What is an advantage and a disadvantage of calling the method getFrequencyOf from contains?

11.  Why are only a few changes necessary to reuse the code in Listing 3-2? How would you implement the changes using the “find and replace” functionality of a text editor or IDE?

12.  Why is a LinkedBag object not concerned about becoming full?

13.  How many assignment operations does the method that you wrote for the previous question require?

14.  Consider the language of these character strings: $, cc$d, cccc$dd, cccccc$ddd, and so on. Write a recursive grammar for this language.

 

15.  Write the prefix expression that represents the following infix expression: (a / b) * c – (d + e) * f

Answers

Related Questions

Business Finance : Introduction to Governmental a...

What is a fund and how is it used? How does the balance of a fund represent the available spendable resources of the entity? Why are there specialized...

Science : Comparative Effectiveness Research...

Explain how Comparative Effectiveness Research (CER) provides for positive effect on population health and provide an example of where it is currently...

Business Finance : Understanding Labor Practices...

Resource: Understanding Labor Practices WorksheetAssess each unfair labor practice using the Understanding Labor Practices worksheet.Determine the lab...

Business Finance : Elite Service Co, Balance shee...

Scenario: On June 1, 2017, Elite Service Co. was started with an initial investment in the company of $22,100 cash. Below are the assets, liabilities,...

Humanities : 3.Religion as a Social Institution,...

Answer the following in 75-90 words each. ThanksConsider and discuss the following questions:1. Arranged MarriagesExplain why romantic love is conside...

Humanities : Introduction to Humanities...

The anthropomorphic gods of Olympic Games tell us about what Greeks valued. Pick one deity or Olympic Game and describe what it reveals about Greek cu...

Humanities : ​Natural Disasters and Research in...

Natural Disasters: Write 250 words each with proper in text citation, APA, reference, and free from Plagiarism. Then follow the below Rubric when writ...

Humanities : Discussion Participation Scoring Gui...

MIXED METHODS DESIGNSResourcesDiscussion Participation Scoring Guide.APA Style and Formatting.Mixed methods designs capitalize on the strengths of qua...

Writing : Rasmussen College Critical Thinking and...

An anecdote is essentially a short story about an interesting or relevant event that happened to someone. Anecdotal evidence is when, rather than prov...

Business Finance : What Great Managers Do-Small a...

Please make sure that each part of this assignment is addressed...Absolutely no PLAGIARISM!!! I have attached the article but please also use another...

Humanities : Take the included attachment and cre...

Take the included attachment and create the following:Prepare a 10- to 12-slide Microsoft PowerPoint presentation. Include photos, illustrations, grap...

Business Finance : section 1.4, Bevan and Sole ,...

Week One Assignment InstructionsIn section 1.4, Bevan and Sole (2014) discuss many principles of communication – taking responsibility for your beha...

Humanities : Facing Our Fears, English homework h...

Review the article, "Facing Our Fears." Open a document and make three columns. Label the first column "What I Already Knew"; the second column "What...

Business Finance : it's time to assemble your...

****PROJECT OVERVIEW IS ATTACHED ****IN 2 WORD DOCUMENTS (PART 1 AND PART 2) PART ONE Now that you have your strategic plan in place, it's time to...

Business Finance : Use the Income Statement and B...

Complete the following homework scenario:Select one (1) U.S. publicly traded company and review its most recent Annual Report. (You may use one (1) of...

Humanities : Technology and Social Change...

Technology and Social ChangeWrite a 1,050- to 1,200-word essay. Provide an introduction that defines both technology and social change, and discusses...

Science : Department Budget...

The CFO for your healthcare organization comes to you once again to ask for your assistance with budgeting. You are tasked with developing a budget fo...

Business Finance : Describe in 3 Paragraphs - Law...

Anne is 10 years old and lives in a major metropolitan U.S. city and is currently in the 4th grade. Today, during gym class, Anne's teacher notice...

Business Finance : Financial Statements...

"Financial Statements"Please respond to the following.For this week’s collaborative activity, review Apple Inc.’s most recent financial statements...

Humanities : Think about a research question and...

Topic: Given the _________________________________ (name the gender-specific challenge), what can _____________ (choose one: educators or parents) do...

Science : Factors Influencing EHR Implementation-...

An integrated electronic health record (EHR) combines patient care records and enhances communications with all major components of hospital care incl...

Business Finance : Contribution of Learning Assig...

ONLY WEEK 5 PORTIONPaper will be completed in APA format with a minimum of 1,500-words.Paper will need to have three authored references used (an arti...

Science : Systems Selection and Influences on Wor...

Physicians and health care organizations may experience and become very concerned about the ways in which their workflow will change when implementing...

Humanities : "Gone Baby Gone". Kant's moral p...

Watch the films "Gone Baby Gone". Judge the main FINAL action as moral or immoral. Support your position by applying Kant's moral philosophy. 500...

If you didn't find the right answer

Ask Your Questions, We'll notify you once someone answers it