Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import java.util.Scanner; public class MembershipFinder { /* Your code goes here */ public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int visits;
import java.util.Scanner;
public class MembershipFinder {
/* Your code goes here */
public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int visits; int userAge;
visits = scnr.nextInt(); userAge = scnr.nextInt(); System.out.println(findMembership(visits, userAge)); } } PLEASE BUILD OFF THIS CODE AND DO JAVA
Define a method findMembership( that takes two integer parameters as a person's number of museum visits and the person's age, and returns the person's museum membership fee as an integer. The membership fee is returned as follows: Ex: If the input is 715 , then the output is: 70 \begin{tabular}{r|r} 1 & import java.util.Scanner; \\ 2 & public class MembershipFinder \{ \\ 3 & \\ 5 & / Your code goes here / \\ 6 & \\ 7 & \\ 8 & \\ 9 & \\ 10 & \\ 11 & public static void main(String[] args) \{ \\ 12 & Scanner scnr = new Scanner(System. in); \\ 13 & int visits; \\ 14 & int userAge; \\ 15 & \end{tabular}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