ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 9.00

CSCI 1301: Introduction to Computing and ProgrammingFall 2016Lab 12

Need help implementing the main method part of the Stat.java file according to the lab instructions. The rest of the code has been created but I'm not sure if it's all correct so hopefully you could check that for me as well. But I have written a large portion of the code already. Just need clarification that everything is correct and works adequately. Thanks in advance 

 

CSCI 1301: Introduction to Computing and ProgrammingFall 2016Lab 12 – More on Classes, Objects, and MethodsPart 1: Group Brainstorm (NO computers during this time)Good programmers think before they begin coding. Part I of this assignment involves brainstorming witha group of peers with absolutely no computers to talk about a strategy for solving this week’s lab.Breakup into groups based on your seating (3-4 people per group) and brainstorm about how to solve theproblem in Part 2 below. Make sure everyone understands the problem and sketch out potential ways tomove toward a solution. Write up a detailed description of your approach in English / pseudocode(English that is structured like a program). This should be 1-2 paragraphs in length (enough to convincethe grader that you have a plan for moving toward a solution). You may find it helpful to look over therequired readings for this week. Make sure to get the last names of those you have worked with – you willneed to provide it in your write-up for Part 2.Include in your write-up which course topics you think will be useful for the lab and a detailed plan forcompleting the exercise & answer the following questions:•How will you write the getData and setData methods that each have to make a copy of an array?See the underlined text on page 2.•Discuss how you will implement the equals method.Is it enough to compare instance variableswith ==?•Discuss test cases for your lab.What types of tests do you think will be in the rubric?Part 2: Submit Individual Brainstorm (You can now use a computer)Login to eLC and submit a version of your group's brainstorm,written in your own wordsunder theAssignment Dropbox titled “Lab 12 Brainstorm”. *Note this is different than the Lab 12 Dropbox whereyou will submit your .java file for this assignment. Feel free to add any additional information that wasnot specified to your write-up. We prefer that you submit the brainstorm before the end of the first labperiod for the week. However, you can submit untilTuesday night at 9PM.Note: Brainstorms that are submitted without a student attending the lab will not begraded unless the student provides a documented excuse to the graduate TA.IntroductionIn this lab you will continue to practice defining your own classes, in this case implementing a classcalledStatthat is described using a UML1class diagram. A class diagram describes the fields(variables) and methods defined for a class. It also specifies the parameters and return types for methods,and it describes whether particular fields and methods are public or private.Collectively, the fields andmethods of a class are called themembersof the class, and the public members define an interface for theclass. It is through this interface that interaction with the class and its instances is made possible.UML is widely used in software engineering to specify the structure and behavior of software systems.We will only deal with a single UML class diagram in this lab, but UML allows one to visually representlarge numbers of classes and other structures as well as how they interrelate (for instance, that one class isa specialization of another). For large software projects, formalisms such as UML are essential if one is tocope with the complexity of the software system.1Note that the textbook states that UML stands for “Universal Modeling Language.” However, “UnifiedModeling Language” is another common name.

public class Stat {private double [] data;public Stat(){data = new double[0];}public Stat (int [] i){data = new double [i.length];for (int index = 0; index<i.length; index++){data[index] = i[index];}}public Stat (long [] lo){data = new double [lo.length];for (int i = 0; i<lo.length; i++){data[i] = lo[i];}}public Stat (float [] f){data = new double [f.length];for (int i = 0; i<f.length; i++){data[i] = f[i];}}public Stat(double[] d){data = new double [d.length];for (int i = 0; i<d.length; i++){data[i] = d[i];}}public double [] getData(){double[] getData1 = new double[data.length];for (int i = 0; i < data.length; i++){getData1[i] = data[i];}return getData1;}

Answers

(11)
Status NEW Posted 09 May 2017 02:05 AM My Price 9.00

-----------

Not Rated(0)