Unit Discussions
Dr. Adriana Badulescu
Unit Discussions
▪ For discussions, you need to submit/post one original
initial post discussing a topic from the unit and
submit/post two response posts during the response
period.
▪ You need to follow the class netiquette. You will lose
points for breaking the netiquette.
▪ Do not share solutions to assignments or other
evaluations in your posts. You are going to lose points.
▪ No late submissions will be accepted.
▪ Post early to not lose the preferred topic and give the
other students enough time to respond.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 2
Unit Discussions
Discussion Unit Chapters/Topics
Discussion 1 Chapters 18, 19, 20, and 21
Discussion 2 Chapters 22, 23, and 24
Discussion 3 Chapters 25, 25, 27, and 28
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 3
Initial Posts
▪ The initial post should summarize a subtopic/section from the Unit
Chapters
▪ Create a new thread containing the name of the topic/subtopic,
the Chapter, location/page/section number in course textbook,
and location/slide number/page in the Chapter presentation PDF
in the thread subject/title
▪ The post body/message should have a minimum 300 words.
▪ The post should be original and should not cover any previously
posted topics. You are not going to earn any credit for duplicated
topics.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 4
Initial Posts
▪ To find the topic in the Textbook:
▪ Go to the course eCampus Textbook and Software
menu to Course Textbook
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 5
Initial Posts
▪ Go to the Table of Contents, find the Chapter and find
the subtopic in the book
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 6
Initial Posts
▪ For example, if I want to talk about the first subtopic in the book
which is about using recursion for computing factorials, in the
textbook, I am going to go to the Chapter 18 and find the
subtopic, which is in section “18.2 Case Study: Computing
Factorials“.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 7
▪ Chapter is Chapter
18
▪ Section is 18.2
▪ Name is “Case Study:
Computing Factorials“
▪ Page is 721
Initial Posts
▪ To find the topic in the chapter presentation
PDF:
▪ Open the Unit, find the Reading Assignment and
Practice Exercise for the Unit and open the
ChapterX where X is the chapter number
▪ Find your subtopic
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 8
Initial Posts
▪ For the example, I am going to go to eCampus and
open the Chapter18 presentation under Unit 1,
and the subtopic is on slide 4.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 9
Initial Posts
▪ Thus, for the example, I am going to name the Initial Post:
“Case Study: Computing Factorials – Chapter 18 – Textbook
Section 18-2 – Page 721 – Presentation Slide 3”
▪ Then make a minimum 300 words post in which I summarize
in my own words what is factorial, what is recursion, why
should I use recursion for factorial, how would the code
would look like, explain how would it work, why using
recursion is better/worse that other methods.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 10
Initial Posts
▪ To post the discussion initial post
▪ Open the discussion
▪ Read the current thread subjects and make sure the subtopic
was not posted already
▪ Click Create Thread to create a new thread for your post
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 11
Initial Posts
▪ Enter the Thread Subject/Title, Thread Message/Body
and click Submit to submit your post
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 12
Initial Posts
▪ After you submit your post, you are going to
see your post on top of the Discussion
▪ If you see a post with the same topic below
(posted before you), you need to post a new
topic
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 13
Response Posts
▪ The response posts should add more
information about the topic, ask questions,
politely debate statements from the initial
posts, respond to questions.
▪ Reply inside the thread and quote the original
post you respond to.
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 14
Response Posts
▪ Click on the Initial Post thread to respond
▪ This will open the original thread
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 15
Response Posts
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 16
▪ When you hover/move the mouse over the button
Reply, you are going to see the Quote button
▪ Click on Quote button to start your response
▪ Note: If you need to edit your own post, this is where
you can find the Edit option
Response Posts
▪ Enter your response in the Thread Message/Body and
click Submit to post your response
Dr. Adriana Badulescu COSC2436 Programming Fundamentals III 17
For Discussion 1, you should post one original initial post discussion a topic from the unit and post two response posts during the response period. No late submissions will be accepted. Post early to not lose the preferred topic and give the other students enough time to respond.
The initial post should summarize a subtopic/section from Chapter 18, 19, 20 and 21 . Create a new thread containing the name of the topic/subtopic, the Chapter, location/page/section number in course textbook, and location/slide number/page in the Chapter presentation PDF in the thread title and minimum 300 words. The post should be original and should not cover any previously posted topics. You are not going to earn any credit for duplicated topics.
The response posts should add more information about the topic, ask questions, politely debate statements from the initial posts, respond to questions. Reply inside the thread and quote the original post you response to.
You need to follow the class netiquette. You will loose point for breaking the netiquette.
Do not share solutions to assignments or other evaluations.
Read the Discussions Instructions below for details instructions and example for your post
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.
N\Method 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 x (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 x (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 x 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()