+1-415-315-9853

info@mywordsolution.com

Programming

 C/C++ Java DOT NET Python Assembly C Sharp Perl COBOL Visual Basic CAD/CAM Object Oriented Programming Asp.NET PHP JSP Shell Scripting Java Script Ajax CSS/HTML Joomla Wordpress Megento Photoshop DBMS PL-SQL Oracle MS-SQL MS-ACCESS My-SQL SYBASE FOXPRO Excel Programming Language Mobile Applications

Home >> Java

Complete the following exercises:

1) prepare a function that uses recursion that converts a decimal number to octal (base 8). The function should accept a single integer and return a String containing the base 8 equivalent.

2) prepare a recursive function that implement the following functions:

a)  x0 = 1
xn = x * xn-1 if n > 0

b) x0 = 1
xn = (xn/2)2 if n > 0 and n is even
xn = x * (xn/2)2 if n> 0 and n is odd

3) How many multiplications will the functions you wrote in problem 2 perform when computing 319? 332?
How many recursive calls will the functions make when computing 319? 332?

4) prepare a recursive function that implements the following function:
f(1) = 1; f(2) = 1; f(3) = 1; f(4) = 3; f(5) = 5
f(n) = f(n-1) + 3 * f(n-5) for all n > 5

Make the function as efficient as possible.

5) Compute f(n) for n = 6, 7, 12, 15

Java, Programming

• Category:- Java
• Reference No.:- M9995

Have any Question?

Related Questions in Java

Part 1 text readingchapter 3 chapter 4 part 2 textbook

Part 1. Text reading Chapter 3, Chapter 4 Part 2 . Textbook questions Chapter 3. Describe why an application developer might choose to run over TCP rather than UDP. Suppose host A is sending host B a large file over a TC ...

1 problem overviewyou have been asked to design and

1 Problem Overview You have been asked to design and implement a training system for company directors. In the best tradition of economics, we shall start by making things up. The training system is intended to show peop ...

Programmers often develop different types of accounts to

Programmers often develop different types of accounts to provide access to a program for a variety of users. The structure of each account is formatted based on the needs of the user and how the program will be used. One ...

Java- object-oriented and concurrent programmingheres a

Java- Object-Oriented and Concurrent Programming Here's a very quick overview of the projects: 1. Read a data file, create the internal data structure, create a GUI to display the structure, and let the user search the s ...

Instructionsi what are the diagrams defined in the uml

Instructions I. What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one. II. Given the following code, how should the toString methods in the classes H2ClassA and H2ClassB be ...

The class below has some errors for each error do the

The class below has some errors. For each error do the following: a) Write the erring section of code and explain what the error is. b) Fix the error (i.e. re-write the code correctly). public class ClassWithErrors { pub ...

Chapter 1 - challenge 3 - training workshopsyour company

Chapter 1 - Challenge #3 - Training Workshops Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented appli ...

Develop an application in java to accept the number of

Develop an application in Java to accept the number of students in a section for a subject and for each student accept the student number, Student name, prelim marks, midterm marks, final marks. The final grade should be ...

Programming assignment - summer semester 2015-purpose-to

Programming Assignment - Summer Semester 2015- Purpose- To provide students with the opportunity to apply the knowledge acquired and skills developed. These include understanding of primitive data types and the concept o ...

Animal characteristicsin todays fast-paced world it is

Animal characteristics In today's fast-paced world, it is important for programmers to think about potential future changes that impact their programs. One way that software developers can address this concern is by desi ...

• 13,132 Experts

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate