Question
Need some help writing some methods in java. ~write a static method called printPassing that accepts an array of grades(doubles) and a number n as
Need some help writing some methods in java.
~write a static method called printPassing that accepts an array of grades(doubles) and a number n as parameters and prints the first n elements of the array that are at least 60.0. If there are fewer than n elements that are at least 60.0, the method should print all of them and stop.
~write a static method called findList that accepts an ArrayList of strings and a substring as parameters and returns the the first string that starts with the substring.
~ Assume you have a class called Student that has a getFirstName() and getLastName() method. Write a static method called findStudent that accepts an ArrayList of Students and a first and last name as parameters and returns the student that has that name. The method should return null if there are no students with that name.
~continue assuming that you have the Student class. write a static method called allTaking that takes two parameters, the first is an ArrayList of all freshman students whoe have declared a major in CompSci. The second is an ArrayList of students who have registered for CS101. It should return whether or not every student who has a declared major in CS is registered for CS101. Two Student instances should be considered the same person if both their first and last names match.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started