SlideShare a Scribd company logo
1 of 1
Download to read offline
Define a method findAnnualMembership() 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:
MEMBERSHIP FEES
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 memberAge;
visits = scnr.nextInt();
memberAge = scnr.nextInt();
System.out.println(findAnnualMembership(visits, memberAge));
}
}
visits < 5 years 5 - 71 years > 71 years
8 65 85 60
9 - 10 45 50 40
11 30 35 25

More Related Content

More from aachalsaleswani

Can I get step by step showing calculations and how you got those numb (1).pdf
Can I get step by step showing calculations and how you got those numb (1).pdfCan I get step by step showing calculations and how you got those numb (1).pdf
Can I get step by step showing calculations and how you got those numb (1).pdfaachalsaleswani
 
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdf
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdfA Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdf
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdfaachalsaleswani
 
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdf
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdfA small liberal arts college in the Northeast has 300 freshmen- One hu.pdf
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdfaachalsaleswani
 
All of the following are true statements EXCEPT- Infectious diseases r.pdf
All of the following are true statements EXCEPT- Infectious diseases r.pdfAll of the following are true statements EXCEPT- Infectious diseases r.pdf
All of the following are true statements EXCEPT- Infectious diseases r.pdfaachalsaleswani
 
A random variable X takes values between 0 and 4 with a cumulative dis.pdf
A random variable X takes values between 0 and 4 with a cumulative dis.pdfA random variable X takes values between 0 and 4 with a cumulative dis.pdf
A random variable X takes values between 0 and 4 with a cumulative dis.pdfaachalsaleswani
 
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdfaachalsaleswani
 
5) The main difference between a Flow type and Repetitive type of prod.pdf
5) The main difference between a Flow type and Repetitive type of prod.pdf5) The main difference between a Flow type and Repetitive type of prod.pdf
5) The main difference between a Flow type and Repetitive type of prod.pdfaachalsaleswani
 
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdfaachalsaleswani
 
Common stock shareholders generally have the rights except- Group of a.pdf
Common stock shareholders generally have the rights except- Group of a.pdfCommon stock shareholders generally have the rights except- Group of a.pdf
Common stock shareholders generally have the rights except- Group of a.pdfaachalsaleswani
 
Cosmos Investment Corporation is exploring multiple investment opportu.pdf
Cosmos Investment Corporation is exploring multiple investment opportu.pdfCosmos Investment Corporation is exploring multiple investment opportu.pdf
Cosmos Investment Corporation is exploring multiple investment opportu.pdfaachalsaleswani
 
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdfaachalsaleswani
 
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdf
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdfComplete the following blanks for Questions 4-9 4- Both kidneys are lo.pdf
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdfaachalsaleswani
 
- Identify the name of the Hierarchy of Effects and the level of consu.pdf
- Identify the name of the Hierarchy of Effects and the level of consu.pdf- Identify the name of the Hierarchy of Effects and the level of consu.pdf
- Identify the name of the Hierarchy of Effects and the level of consu.pdfaachalsaleswani
 

More from aachalsaleswani (13)

Can I get step by step showing calculations and how you got those numb (1).pdf
Can I get step by step showing calculations and how you got those numb (1).pdfCan I get step by step showing calculations and how you got those numb (1).pdf
Can I get step by step showing calculations and how you got those numb (1).pdf
 
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdf
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdfA Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdf
A Arawen A Acen thire b- Noider Revalde- a- Wijes fidite theweme Proti.pdf
 
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdf
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdfA small liberal arts college in the Northeast has 300 freshmen- One hu.pdf
A small liberal arts college in the Northeast has 300 freshmen- One hu.pdf
 
All of the following are true statements EXCEPT- Infectious diseases r.pdf
All of the following are true statements EXCEPT- Infectious diseases r.pdfAll of the following are true statements EXCEPT- Infectious diseases r.pdf
All of the following are true statements EXCEPT- Infectious diseases r.pdf
 
A random variable X takes values between 0 and 4 with a cumulative dis.pdf
A random variable X takes values between 0 and 4 with a cumulative dis.pdfA random variable X takes values between 0 and 4 with a cumulative dis.pdf
A random variable X takes values between 0 and 4 with a cumulative dis.pdf
 
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf
2021 Percentage Method Tables for Manual Payroll Systems With Forms W-.pdf
 
5) The main difference between a Flow type and Repetitive type of prod.pdf
5) The main difference between a Flow type and Repetitive type of prod.pdf5) The main difference between a Flow type and Repetitive type of prod.pdf
5) The main difference between a Flow type and Repetitive type of prod.pdf
 
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf
14- -18 pts- Consider a closed economy with Demand for Consumption- In.pdf
 
Common stock shareholders generally have the rights except- Group of a.pdf
Common stock shareholders generally have the rights except- Group of a.pdfCommon stock shareholders generally have the rights except- Group of a.pdf
Common stock shareholders generally have the rights except- Group of a.pdf
 
Cosmos Investment Corporation is exploring multiple investment opportu.pdf
Cosmos Investment Corporation is exploring multiple investment opportu.pdfCosmos Investment Corporation is exploring multiple investment opportu.pdf
Cosmos Investment Corporation is exploring multiple investment opportu.pdf
 
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf
-n-(fx2)-+-(x)-2 thanfed driation ( Aiend te ene decinal idese as aeed.pdf
 
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdf
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdfComplete the following blanks for Questions 4-9 4- Both kidneys are lo.pdf
Complete the following blanks for Questions 4-9 4- Both kidneys are lo.pdf
 
- Identify the name of the Hierarchy of Effects and the level of consu.pdf
- Identify the name of the Hierarchy of Effects and the level of consu.pdf- Identify the name of the Hierarchy of Effects and the level of consu.pdf
- Identify the name of the Hierarchy of Effects and the level of consu.pdf
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

Define a method findAnnualMembership() that takes two integer paramete.pdf

  • 1. Define a method findAnnualMembership() 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: MEMBERSHIP FEES 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 memberAge; visits = scnr.nextInt(); memberAge = scnr.nextInt(); System.out.println(findAnnualMembership(visits, memberAge)); } } visits < 5 years 5 - 71 years > 71 years 8 65 85 60 9 - 10 45 50 40 11 30 35 25