Implement function questiononethat returns java file object

Assignment Help Programming Languages
Reference no: EM132232202

Question 1: Getting the Data

Dr. Nam Bo Phan approached QHR with a problem to solve. She has recently learnt of a process digitSquareSum() that takes a number and returns the sum of the squares of each of its digits. She asked her assistant Ken Nothad to build a list of results for the numbers 1 to 500.

X            digitSquareSum(x)

1                     1

2                     4

...                   ...

Ken got started on the list, but got tired of punching the digits in his calculator. Dr. Phan would like us to produce this list.

Requirements: • Implement digitSquareSum()

• Implement a function questionOne() that returns a Java File object for a CSV file that has the following data populated:

1,1

2,4

3,9

...

500,25

Question 2: Forming the Link

Dr. Phan has found that by performing digitSquareSum() multiple times, two numbers get back to their original number:

• 1 -> 1

• 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89

She asked Ken to identify which of the original numbers, between 1 and 500, will arrive at 1 after multiple iterations of performing digitSquareSum(). Ken is threatening to quit.

Requirements: • Implement a function questionTwo() that returns the ascending numbers as a comma-separated String (e.g. 1,7,10,...)

Question 3: Taking on the World

Ken has called QHR to say that Dr. Phan has been rocking in her chair and going on about world domination. Her latest request has Ken fearing for his sanity and his life.

Requirements:

• Implement a method questionThree() to determine how many starting numbers between 1 and 10 million inclusively take more than 7 executions of digitSquareSum() to reach an 89.

• questionThree() should be optimized for speed.

Reference no: EM132232202

Questions Cloud

Wireless security is an issue on many data networks : Wireless security is an issue on many data networks. Best practices state that the "WiFi" network needs to be separate from the wired network.
Identifying ways in which engineered system : Describe a method for identifying ways in which an engineered system could fail. What is the primary goal of this method of analysis?
Vpns are commonplace in modern data networks : VPNs are commonplace in modern data networks and are required for many employees.
State of development and the structure of hospitals : Describe the traditional structure and function of IT in hospitals in the context of its state of development and the structure of hospitals.
Implement function questiononethat returns java file object : Dr. Nam Bo Phan approached QHR with a problem to solve. She has recently learnt of a process digitSquareSum() that takes a number and returns the sum.
Differences relative to managing operations : What are the implications of these differences relative to managing operations.
Write a function named replacement : Write a function named "replacement" that takes a string as a parameter and returns an identical string except with every instance of the character "q"
Strategic business analysis-developing a plan for growth : State three established international operating businesses that you feel are not meeting their full potential.
Disadvantages of allowing unlimited access : What might be the disadvantages of allowing unlimited access? What might be the advantages?

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to input the assignment number

The program must prompt teacher to input the assignment number. Score for student for that assignment will be displayed.

  Calculate the total number of jobs

Write a function that takes the name of a report file as its argument and returns the percentage value from the bottom table in the report - create a data frame with the year-month for each report in one column and the percentage values in another c..

  Give a pseudo-code description of a function

Give a pseudo-code description of a function that uses only D and Q (and no other variables or objects) and results in D storing the elements.

  User-s ability to navigate the web site correctly

This can paralyze a user's ability to navigate the Web site correctly. Examples include opening new browser windows or using meta-refresh to force a page.

  Explaining class definition of subclass of square

Write down the class definition of subclass of Square called FancySquare which has a method called getDiagonal. The getDiagonal method gets no arguments.

  Creating session by granting needed privilege

Make sure that Bob can't create objects greater than 512K in size in USERS01 tablespace. And now that user is created, ensure that Bob can create session, by granting needed privilege.

  Write a program to allow user to create a binary search tree

Write a program to allow user to create a binary search tree. Your program should display in BFT and DFT (in order) format.

  Construct a finite state machine m that accepts

Construct a finite state machine M that accepts these variables, constants, assignment operators and others, as well as all the reserved words for this primitive programming language that you are defined in Problem 1.

  Differences between pass by reference and pass by value

Discuss the advantages and disadvantages of using pass by reference versus pass by value in an embedded C program.

  Using unix extract the various ethnic populations in file

Using Unix extract the various ethnic populations in your file.

  Calculate the number of employees in electrical department

Calculate the number of employees in the electrical department. Type your first and last name, your ID number, and section number at the end of the worksheet.

  Explain the functions which are useful

Explain some of the functions which you have found useful, where you found them, and how you use them. Describe good programming practices.

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