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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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