1. Create a class called MyFriends, with the following attributes variables: a. studentArray(Student[]) 2. Add the following methods in MyFriends: a. fillArray i. Using scanner ask how many students does the user want to input ii. Capture user input for all of his friends (Of course we are assuming all your friends would be similar UWC students, go ask around and meet new friends, also preferably not in the same Computer Science department … if possible … only if possible) b. main i. Call the fillArray method ii. Count how many Computer Science students iii. If half or more students are Computer Science students, then display “You … need more friends …”

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

1. Create a class called MyFriends, with the following attributes variables:
a. studentArray(Student[])
2. Add the following methods in MyFriends:
a. fillArray
i. Using scanner ask how many students does the user want to input
ii. Capture user input for all of his friends
(Of course we are assuming all your friends would be similar
UWC students, go ask around and meet new friends, also
preferably not in the same Computer Science department … if
possible … only if possible)
b. main
i. Call the fillArray method
ii. Count how many Computer Science students
iii. If half or more students are Computer Science students, then
display “You … need more friends …”
iv. Otherwise display “Nice, diversity is good” 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,