Get Similar Asssignment Answers & Custom Paper Writing Services

To hire a writer, fill the order form with details from your nursing assessment task brief.

Posted: February 26th, 2022

COSC 2A

ASSIGNMENT 2A

Design a program/project/driver class (the program/project/driver class file should be called YourNameAssignment2A; replace YourName with your actual name), that is going to show your understanding of program complexity on different solutions to the same problem.

Part 1. Add to your YourNameAssignment2A driver class the following 3 methods (use the exact/precise names) to compute Nth element of the following series (representing the sum of the squares of the first N positive integers): 1+22+32+…N2

Method Description

Method1 A recursive method with parameter N that used recursion to compute the Nth element in the series.

Method2 A brute method with parameter N that uses a loop to compute the Nth element in the series.

Method3 A mathematical method with parameter N that uses mathematic summation formula1 to compute the Nth element in the series.

In your main method, call all the 3 methods Method1, Method2, and Method3 to determine which of the 3 methods is faster by computing the run time 2 needed for the following 5 values for N : 100000 (a hundred thousand), 1000 (1

thousand), 10 (ten), -1000 (negative one thousand), and -1000000 (negative one hundred thousand) and output the values or ERROR3 (if you run into a memory Overflow or Out of Memory issue even after using the largest integral type) in a table format below (no lines needed) in which each cell has the run time for that method for that value for N.

NMethod Method1 Method2 Method3

100000

1000

10

-1000

-100000

Part 2. Compute the complexity of each of the 3 methods/algorithm using the Big O notation and add the calculations for each of the 3 methods into a Microsoft Word document called YourNameAssignment2A-Complexity.docx (replace YourName with your actual name). You should show the Big O notation calculation for the method complexity for each one of the 3 methods. Which of the 3 methods is the best one? Add your answers to the document in the table bellow: in column to the complexity of that method in Big-O notation and on the third column the Big O notation calculation for the method complexity with explanations. For the Best Method, explain why the listed method is the best.

Method Complexity in Big O notation Calculation/Explanation

Method1

Method2

Method3

Best Method

Part 3: Create a document Create a Microsoft Word document called YourNameAssignment2A-Screeshots.docx (replace YourName with your actual name) that contains screenshots of the complete JAVA source code in the IDE and the complete program output. If the entire class JAVA source code or the output does not fit in one screenshot or the screenshots cannot be easily read, create multiple screenshots and add them to the same document.

Submit YourNameAssignment2A.java JAVA source code file, YourNameAssignment2A-Complexity.docx complexity analysis document, and YourName-Assignment2A-Screenshots Microsoft Word screenshots document on eCampus under the Assignment2A. Do not archive the files (no ZIP, no RAR, etc) or submit other file formats. Review the files in your eCampus submission confirmation window.

1 Look at this website to find the formula and, if interested, to see how it is computed https://brilliant.org/wiki/sum-of-n-n2-or-n3/ 2 You can compute the run time using the System.nanoTime() method 3 Output “ERROR” if you run into a memory Overflow or Out of Memory issue even after using the largest integral type

https://brilliant.org/wiki/sum-of-n-n2-or-n3/
https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#nanoTime()

————

2A ASSIGNMENT

Create a program/project/driver class (the program/project/driver class file should be called YourNameAssignment2A; replace YourName with your real name) to demonstrate your understanding of program complexity on multiple solutions to the same problem.

Part 1. Add the following three methods (use the exact/precise names) to your YourNameAssignment2A driver class to compute the Nth element of the following series (representing the sum of the squares of the first N positive integers): 1+22+32+…N2

Description of the Method

Method1 A recursive algorithm with parameter N that employed recursion to find the Nth element of a series.

Method2 A brutal approach with parameter N that employs a loop to find the Nth member in a series.

Method3 A mathematical method with parameter N that uses mathematic summation formula1

Order | Check Discount

Tags: write my history essay for me, psychology assignment topics, online nursing papers, online nursing essay writing service, nursing assignment writers

Nursing Assignment Help For You!

Special Offer! Get 20-30% Off Your Order!

Why Seek Our Custom Writing Services

Every Student Wants Quality and That’s What We Deliver

Graduate Essay Writers

Only the most qualified writers are selected to be a part of our research and editorial team, with each possessing specialized knowledge in specific subjects and a background in academic writing.

Affordable Prices

Our prices strike the perfect balance between affordability and quality. We offer student-friendly rates that are competitive within the industry, without compromising on our high writing service standards.

100% Plagiarism-Free

No AI/chatgpt use. We write all our papers from scratch thus 0% similarity index. We scan every final draft before submitting it to a customer.

How it works

When you decide to place an order with Nursing Study Bay, here is what happens:

Fill the Order Form

You will complete our order form, filling in all of the fields and giving us as much guidelines - instruction details as possible.

Assignment of Writer

We assess your order and pair it with a skilled writer who possesses the specific qualifications for that subject. They then start the research/writing from scratch.

Order in Progress and Delivery

You and the assigned expert writer have direct communication throughout the process. Upon receiving the final draft, you can either approve it or request revisions.

Giving us Feedback (and other options)

We seek to understand your experience. You can also review testimonials from other clients, from where you can select your preferred professional writer to assist with your homework assignments.

For Similar Answers, Custom Essay Writing & Assignment Help Services

Find an expert by filling an order form for your nursing paper. We write AI-plagiarism free essays and case study analysis. Anytime!

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00