Ap Comp Sci Principles Unit 5:Create Performance Task Project Ap Comp Sci Principles Assignment

583 words - 3 pages

Part a
Video is attached with narration
Part b
The purpose of my program is to help solve quadratic equations. I faced some difficulties along
the way as I pursued this purpose. For example, often times my solution methods were
returning “NaN”. I initially attempted to solve this by writing out the formula and making sure the
parentheses were grouped correctly. I ended up collaborating with one of my classmates to
determine why sometimes the solution was correct and other times it returned “NaN. I
determined that it returned “NaN” when the solutions were not real. After figuring out the
problem with the help of a partner, I independently learned about exceptions and how to “throw”
and “catch”. Using this new knowledge of exceptions, I was able to handle non-real solutions.
Initially, my problem was not user interactive. I learned about the Scanner class and saw the
opportunity to add a user interaction part to it to make it more friendly. I also saw many
opportunities to use abstraction such as when finding the solutions, I did not need to reprogram
the discriminant aspect of the quadratic formula. Instead, I just called the discriminant method of
my class.
Part c
public double getFirstSolution() {
double firstxsolution;
double discriminant = getDiscriminant();
if(discriminant<0) {
throw new IllegalArgumentException("The discriminant is negative. There
are no real solutions");
}
double root = Math.sqrt(discriminant);
firstxsolution = (-b + root)/(2*a);
return firstxsolution;
}
This is my algorithm to get the first solution of the quadratic equation. It works by using the
discriminant method of my class and using the Math class for some operations. First, I call the
getDiscriminant() method and store the value of b^2 -...

Other Essays On AP Comp Sci Principles Unit 5:Create Performance Task Project - AP Comp Sci Principles - Assignment

four principles of interpersonal communication - communications - assignment

656 words - 3 pages The Four Principles of Interpersonal Communication Four Principles of Interpersonal Communication These principles underlie the workings in real life of interpersonal communication. They are basic to communication. We can't ignore them. Interpersonal communication is inescapable We can't not communicate. The very attempt not to communicate communicates something. Through not only words, but through tone of voice and through gesture, posture

AP European History Unit 1 Corrections - Chaska Middle School; AP European History - Test Corrections

2703 words - 11 pages Unit 1 Test Correction From the beginning of the Middle Ages to the end of Martin Luther’s Reformation, there were countless changes that occurred in the religious, social, political, and economic areas of European life. These changes could have destroyed certain ideas while other changes created new ones. More often than not, these areas of influence affected one another and created situations that benefited some while harming others. An

“The Death of the Moth” questions -AP Lang.docx - AP Lang - Assignment

552 words - 3 pages Chris Moon Mrs. Cmaylo Per 5; AP Lang 1/16/2017 Focus Work: “The Death of the Moth” What effect is Woolf striving for? In “The Death of the Moth”, Virginia Woolf is striving for the effect of making the reader contemplate about the relationship between life and death, and how one should view it. How does she create that effect? Woolf creates this effect by implementing rhetorical devices such as imagery and by creating a calm and observative

AP World History Myans and Aztecs - AP World History - Homework Assignment

991 words - 4 pages the Christian leaders. Cities continued to grow and urban economies continued to be born and this enhanced the commercial side of the West. The Church has accepted the principles of capitalism as profit seeking. Technology continued to advance especially in ironwork used for bells and weapons and timekeeping. 5. How did the Renaissance affect and benefit European society? The Renaissance was significant on the development of Western Europe and

personality project on what our personality is - ap psychology - essay

1400 words - 6 pages Lau 1 Tammy Lau Mrs. Nelson AP Psychology, Period 4 30 March 2018 Personality Project In order to figure out our personalities and who we are as an individual, we use personality theories, such as psychodynamic and psychoanalytic, humanistic, trait, social-cognitive, and positive psychology, to determine it. Psychoanalytic and psychodynamic puts emphasis on our childhood memories and how our unconscious mind functions. Humanistic theories focus

The Tsunami on a Lake, a Short Story - Cherokee/American Lit/comp - Homework Assignment

581 words - 3 pages Brubaker 1 Sean Brubaker Mrs. Mullett American Lit/Comp 5 June 2018 The Tsunami on the Lake It was a beautiful, clear sky Tuesday in good ole rural North Carolina when everything started falling apart, quite literally. On the side of the road stood two young men, one short and red-haired and the other who was tall, muscular, and completely gray-haired. They were examining their trailer’s shredded wheel, and they had no idea what to do since they

AP US Outlines Chapters 1 and 2 - US History - Assignment

5767 words - 24 pages clan. 3. The cultures of these eastern peoples were diverse; however, European diseases killed thousands of them in the 1540’s and the survivors had to live in smaller and smaller communities. 4. In these societies, like many others in different regions, the men hunted and fished while the women raised corn, squash, and beans. a. A matrilineal system of kinship developed as a result. 5. Religious rituals centered on agriculture and populations

ap human geography module 5 lesson 8 essay - virtual school - essay

909 words - 4 pages Assignment 5.08 Does every religion have the potential to become a global religion? Or are some religions destined to remain local? “‘[Globalization can be defined as a process of an “ever more interdependent world’ where ‘political, economic, social, and cultural relationships are not restricted to territorial boundaries or to state actors,’ globalization has much do with its impact on cultures.”(Golebiewski, 2014) Every religion has the

Say-mean-matter AP English Language - AP English-language - Assignment

427 words - 2 pages 1. Say-Mean-Matter SaySay   MeanMean   MatterMatter   “But time is the one thing we have been given, and we have been given to time.” ch 6 pg. 87 We have been given a lot of time to use. What are we going to do with all our time? We should use our time wisely. It’s important to manage your time. “Dragonfly nymphs, for instance, are easily able to shed a leg or two to escape a tight spot, but even dragonfly nymphs get stuck in the algae strands

Illustartion essay, use this for any english/comp assignment. I got a 100 on this - Comp - essay

431 words - 2 pages Letter to the Chicago Bulls organization From a Worried Fan Our current roster has no depth and our “potential” is mainly focused around Lauri Markkanen, he had a pretty average rookie season on the team he really should’ve completely taken over. He is just a rookie and still does have potential but we have no one who can assist on this team, We picked Zach Lavine, Kris Dunn, and Cameron Payne, In my opinion, this was a horrific trade, Zach

AP US History Workbook Analysis - APUSH - Assignment

985 words - 4 pages the Allied countries, The most powerful being France, Britain and Italy, wanted to create a treaty that punished Germany for starting WWI. REVENGE!!! Woodrow is the only one who didn’t want revenge. In Wilson’s 14 points, the only one that gone in the Treaty of Versailles was the League of Nations. This isn’t going to fly because it is internationalism that doesn’t jive with our isolationism. Treaty of Versailles: Pay Reparations, War Guilt

Similar Papers

Addicted To Dance The Love Of My Life Ap Lang And Comp Essay

830 words - 4 pages Kendal Suchanek September 24, 2018 Ap Lang and Comp Addicted It’s guilty desire, something you could not live without. You never can have enough, never will you be fulfilled. Addiction, it’s a love hate relationship. As convincing as it sounds, putting my life on the line, shooting god knows what in my arms, I truly consider that dancing a my drug running through my body. Never will I get enough. Would it be immoral to say dancing is my life

Moral Dilemma Of Computer Science & Government Tamu Comp Sci Short Research Assignment

489 words - 2 pages Name a) My dilemma is one that happened between Apple and the FBI in 2015. There was a dispute between the two organizations over the unlocking of an iPhone 5C, specifically, the one used by one of the terrorists involved in the San Bernardino shooting. The FBI tried to force Apple to create a special OS that would allow them to unlock the phone without the password. Apple declined to do so because doing this would violate their policy of not

Victorian Era Literature Unit Test Ap English Lit. Assignment

744 words - 3 pages Leslie Doria AP Eng.lit Graded Assignment Victorian Era Literature Unit Test, Part 2 In this section, you'll have 40 minutes to develop an essay response to the following prompt. Complete this teacher-scored portion of the Unit Test, and submit it to your teacher by the due date for full credit. Essay (80 points) Bessie sings the poem shown below to the youthful Jane Eyre, after which Jane sobs

Training Methods And Principles 10 Aqua Assignment

463 words - 2 pages Training Methods & Principles Principles · Progressive overload Progressively challenge the body so that it will continue to make changes to cope with the new demands (thus increasing fitness) If training remains the same for 6 months fitness level will not keep increasing, but remain at a constant level · Specificity Fitness is specific- adaptations from training will be directly related to the type of training undertaken Training programs must