Computers and Technology
Computers and Technology, 17.06.2021 20:50, shady1095

CSE 110 - Lab 6 - arrays Lab Topics • Learning how to use Array data types in Java Lab Problem: Array Data Types An array is a fixed-size container which stores a collection of values of the same type. In practice, collecting and managing multiple values in Java programs are very common operations. In this Lab, you will learn syntax of array in Java and some basic array operations. Part 1. Creating an Array and Filling in Values Say we are in CSE110 and the students are grouped into multiple groups. The TAs need a simple program to keep track of the distributions of grades in all groups. Your task is to design a program that can help the user key in the records (including group # and grade). Your program logic will look like the following steps: 1. Ask the user for one number as the size of an array, save it as numStudents 2. Create an int array by numStudents, save it as studentGroups 3. Create a double array by numStudents, save it as studentGrades 4. Create a for loop which iterates index i from 1 to numStudents, for each i a. Ask the user for an integer, save it at index i in studentGroups b. Ask the user for a double number (student grade), save it at index i in studentGrades 5. Print out the content in both arrays as shown in the sample output. Note: Make sure to complete Part 1 to practice arrays. The Part 2 is for those who like to practice more useful array operations. If you plan to do Part 2, you will need another variable to keep track of how many groups are there, which will be used in Part 2. (Hint: finding the maximum in input group numbers.) Part 2. Basic Statistics by Basic Arrays (Challenge) After finishing Part 1, you will have two arrays, in which you save students' group numbers and their grades. Please calculate two basic statics about students' grades in each group. Here we assume group numbers are consecutive and greater than 0. Hint 1: You might need two extra arrays, one for group sizes and one for group averages. Hint 2: By adding one more element to your array, the indices of arrays can be directly used to represent group numbers. Sample Output Below is an example of what your output should roughly look like when this lab is completed. The RED texts are user inputs. The BLUE texts are not required. How many students do you have? 5 [Group #] and [Grade] for Entry 1 1 10 [Group #] and [Grade] for Entry 2 2 10 [Group #] and [Grade] for Entry 3 27 [Group #] and [Grade] for Entry 4 1 5 [Group #] and [Grade] for Entry 5 38 List of Student Records Group 1 10.0 Points Group 2 10.0 Points Group 2 7.0 Points Group 1 5.0 Points Group 3 - 8.0 Points Group Statistics Group #1 has 2 students, average is 7.50 Group #2 has 2 students, average is 8.50 Group #3 has 1 students, average is 8.00

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:20, shadowgirl1213
Write a select statement that returns product name, customer first name, customer last name, channel description, and amount sold for all the sales. make sure to returns sales even if there is no information on the customer, product, or channe
Answers: 2
image
Computers and Technology, 22.06.2019 00:30, huntbuck14
Which of the following methods could be considered a “best practice” in terms of informing respondents how their answers to an on-line survey about personal information will be protected? respondents are informed that investigators will try to keep their participation confidential; however, confidentiality cannot be assured. respondents are informed that a research assistant will transfer all the research data to a password-protected computer that is not connected to the internet, via a usb flashdrive. the computer is located in a research team member’s office. the investigator uses the informed consent process to explain her institution’s method for guaranteeing absolute confidentiality of research data. the investigator uses the informed consent process to explain how respondent data will be transmitted from the website to his encrypted database without ever recording respondents’ ip addresses, but explains that on the internet confidentiality cannot be absolutely guaranteed.
Answers: 1
image
Computers and Technology, 22.06.2019 10:20, vuqepete4528
Shown below is the start of a coding region within the fist exon of a gene. 5'--3' 3'--5' how many cas9 pam sequences are present?
Answers: 1
image
Computers and Technology, 22.06.2019 12:30, zaratayyibah
Which of the choices sean are not true when considering virus behavior
Answers: 1
Do you know the correct answer?
CSE 110 - Lab 6 - arrays Lab Topics • Learning how to use Array data types in Java Lab Problem: Ar...

Questions in other subjects:

Konu
Mathematics, 19.09.2020 01:01
Konu
English, 19.09.2020 01:01