SlideShare uma empresa Scribd logo
1 de 2
3: Freudian Sip e coffee and are on a tight budget, you certainly want to be sure you get your
money's worth. You like cream in your coffee, but you realized that asking for "no room"
means that you also get less coffee, the barrista will leave enough room in the cup for you to add
your cream. So you wonder how much you lose when you ask for "room". answer that
question, you measured the geometry of a small Freudian Sip coffee cup, and then gathered some
drta on how the cup was filled with "room" versus "no room". You asked for 5 small coffees
"with room" and with room, and measured the depth of the liquid, measuring along the side of
the cup (d'). You will create an application (user interface worksheet and main Sub procedure)
to analyze data. d (mm) with room no room Top rim of cup 22 Rt 4.0 cm Rb 3.2 cm H 4.2 cm
Averages: Fluid bottom of cup lost with room the User create output cells the average with your
liquid depth measurements. Enter the input data shown. Create the three for depths and
percentage of lost coffee for pours with "no room". Using your geometry reference book, you
looked up the formula for calculating the volume of a right circular cone section: Hints: 1) Let e
s cup cone angle from vertical, then tan(6) (R Rb)/H 2) Let Rrs the fluid level radius, then sin(6)
(Rt Rr)/d. Write a Sub procedure that does the following: a. Reads the cup geometry into
procedure variables, and the fluid depth measurements into a two-dimensional static array. b.
Calculates the average depths for "with room" and for "no room", and write the results to the
output cells. c. Calculates the volume of coffee for each case, storing these results in procedure
variables. d. Calculates and writes out the percent of coffee lost for the "with room" case,
relative to the "no room case.
Solution
public class MyCylinder 03 { 04 Â Â Â Â public static void main (String[] args) 05 Â Â Â Â {
06 Â Â Â Â Â Â Â Â double radius =
Double.parseDouble(JOptionPane.showInputDialog(null,"enter radius")); 07
        double Length = 1; 08         double volume = Math.PI * radius
* radius * Length; 09 Â Â Â Â Â Â Â Â System.out.println("volume " + volume); 10
         11     } 12 }
3- Freudian Sip e coffee and are on a tight budget- you certainly want.docx

Mais conteúdo relacionado

Mais de todd621

3- After water vapor- CO2 is the next most important atmospheric trace.docx
3- After water vapor- CO2 is the next most important atmospheric trace.docx3- After water vapor- CO2 is the next most important atmospheric trace.docx
3- After water vapor- CO2 is the next most important atmospheric trace.docxtodd621
 
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docxtodd621
 
2014 2013 LINK TO TEXT LINK TO TEXT The following account b.docx
2014 2013 LINK TO TEXT LINK TO TEXT            The following account b.docx2014 2013 LINK TO TEXT LINK TO TEXT            The following account b.docx
2014 2013 LINK TO TEXT LINK TO TEXT The following account b.docxtodd621
 
2- There are 3 mechanisms of heat transfer and all are important in ma.docx
2- There are 3 mechanisms of heat transfer and all are important in ma.docx2- There are 3 mechanisms of heat transfer and all are important in ma.docx
2- There are 3 mechanisms of heat transfer and all are important in ma.docxtodd621
 
2- Marvin Services Corporation had the following accounts and balances.docx
2- Marvin Services Corporation had the following accounts and balances.docx2- Marvin Services Corporation had the following accounts and balances.docx
2- Marvin Services Corporation had the following accounts and balances.docxtodd621
 
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docxtodd621
 
18- Ray was chosen by his boss to lead a team of coworkers during a co.docx
18- Ray was chosen by his boss to lead a team of coworkers during a co.docx18- Ray was chosen by his boss to lead a team of coworkers during a co.docx
18- Ray was chosen by his boss to lead a team of coworkers during a co.docxtodd621
 
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docxtodd621
 

Mais de todd621 (8)

3- After water vapor- CO2 is the next most important atmospheric trace.docx
3- After water vapor- CO2 is the next most important atmospheric trace.docx3- After water vapor- CO2 is the next most important atmospheric trace.docx
3- After water vapor- CO2 is the next most important atmospheric trace.docx
 
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx
2014 Health Savings Accounts (HSA) Exam - Scenario 4- Carlos and Julie.docx
 
2014 2013 LINK TO TEXT LINK TO TEXT The following account b.docx
2014 2013 LINK TO TEXT LINK TO TEXT            The following account b.docx2014 2013 LINK TO TEXT LINK TO TEXT            The following account b.docx
2014 2013 LINK TO TEXT LINK TO TEXT The following account b.docx
 
2- There are 3 mechanisms of heat transfer and all are important in ma.docx
2- There are 3 mechanisms of heat transfer and all are important in ma.docx2- There are 3 mechanisms of heat transfer and all are important in ma.docx
2- There are 3 mechanisms of heat transfer and all are important in ma.docx
 
2- Marvin Services Corporation had the following accounts and balances.docx
2- Marvin Services Corporation had the following accounts and balances.docx2- Marvin Services Corporation had the following accounts and balances.docx
2- Marvin Services Corporation had the following accounts and balances.docx
 
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx
2- The following are types of organisms- A- bacteria- B- fungi- C- alg.docx
 
18- Ray was chosen by his boss to lead a team of coworkers during a co.docx
18- Ray was chosen by his boss to lead a team of coworkers during a co.docx18- Ray was chosen by his boss to lead a team of coworkers during a co.docx
18- Ray was chosen by his boss to lead a team of coworkers during a co.docx
 
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx
2- Accepted $16-700 on February 1- 2014- as a retainer for services to.docx
 

Último

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 

Último (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 

3- Freudian Sip e coffee and are on a tight budget- you certainly want.docx

  • 1. 3: Freudian Sip e coffee and are on a tight budget, you certainly want to be sure you get your money's worth. You like cream in your coffee, but you realized that asking for "no room" means that you also get less coffee, the barrista will leave enough room in the cup for you to add your cream. So you wonder how much you lose when you ask for "room". answer that question, you measured the geometry of a small Freudian Sip coffee cup, and then gathered some drta on how the cup was filled with "room" versus "no room". You asked for 5 small coffees "with room" and with room, and measured the depth of the liquid, measuring along the side of the cup (d'). You will create an application (user interface worksheet and main Sub procedure) to analyze data. d (mm) with room no room Top rim of cup 22 Rt 4.0 cm Rb 3.2 cm H 4.2 cm Averages: Fluid bottom of cup lost with room the User create output cells the average with your liquid depth measurements. Enter the input data shown. Create the three for depths and percentage of lost coffee for pours with "no room". Using your geometry reference book, you looked up the formula for calculating the volume of a right circular cone section: Hints: 1) Let e s cup cone angle from vertical, then tan(6) (R Rb)/H 2) Let Rrs the fluid level radius, then sin(6) (Rt Rr)/d. Write a Sub procedure that does the following: a. Reads the cup geometry into procedure variables, and the fluid depth measurements into a two-dimensional static array. b. Calculates the average depths for "with room" and for "no room", and write the results to the output cells. c. Calculates the volume of coffee for each case, storing these results in procedure variables. d. Calculates and writes out the percent of coffee lost for the "with room" case, relative to the "no room case. Solution public class MyCylinder 03 { 04 Â Â Â Â public static void main (String[] args) 05 Â Â Â Â { 06 Â Â Â Â Â Â Â Â double radius = Double.parseDouble(JOptionPane.showInputDialog(null,"enter radius")); 07 Â Â Â Â Â Â Â Â double Length = 1; 08 Â Â Â Â Â Â Â Â double volume = Math.PI * radius * radius * Length; 09 Â Â Â Â Â Â Â Â System.out.println("volume " + volume); 10 Â Â Â Â Â Â Â Â Â 11 Â Â Â Â } 12 }