Order For Similar Custom Papers & Assignment Help Services

Fill the order form details - writing instructions guides, and get your paper done.

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: best assignment help websites in canada, best nursing paper writing service, buy psychology essay, Cheap Psychology Essay Writing Service, dissertation assignment help

Assignment Help For You!

Special Offer! Get 20-25% Off On your Order!

Why choose us

You Want Quality and That’s What We Deliver

Top Skilled Writers

To ensure professionalism, we carefully curate our team by handpicking highly skilled writers and editors, each possessing specialized knowledge in distinct subject areas and a strong background in academic writing. This selection process guarantees that our writers are well-equipped to write on a variety of topics with expertise. Whether it's help writing an essay in nursing, medical, healthcare, management, psychology, and other related subjects, we have the right expert for you. Our diverse team 24/7 ensures that we can meet the specific needs of students across the various learning instututions.

Affordable Prices

The Essay Bishops 'write my paper' online service strives to provide the best writers at the most competitive rates—student-friendly cost, ensuring affordability without compromising on quality. We understand the financial constraints students face and aim to offer exceptional value. Our pricing is both fair and reasonable to college/university students in comparison to other paper writing services in the academic market. This commitment to affordability sets us apart and makes our services accessible to a wider range of students.

100% Plagiarism-Free

Minimal Similarity Index Score on our content. Rest assured, you'll never receive a product with any traces of plagiarism, AI, GenAI, or ChatGPT, as our team is dedicated to ensuring the highest standards of originality. We rigorously scan each final draft before it's sent to you, guaranteeing originality and maintaining our commitment to delivering plagiarism-free content. Your satisfaction and trust are our top priorities.

How it works

When you decide to place an order with Dissertation App, here is what happens:

Complete the Order Form

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

Assignment of Writer

We analyze your order and match it with a writer who has the unique qualifications to complete it, and he begins from scratch.

Order in Production and Delivered

You and your writer communicate directly during the process, and, once you receive the final draft, you either approve it or ask for revisions.

Giving us Feedback (and other options)

We want to know how your experience went. You can read other clients’ testimonials too. And among many options, you can choose a favorite writer.