SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Complete the parts in a single file. Name your classes Week3 and your files Week3. Java. After
you are done, upload a one file named Week3. java, which should contain the all implemented
methods. Part I ( 50 points) Write a method named diceSum which takes an integer value N as a
parameter, throws a fair dice N times, sums the lowest two values, and then prints the result in
the console. Part II ( 50 points) Write a method named makeShape that takes an odd integer
value N as a parameter. If input value N is not an odd value print "Input should be an odd
number.". Otherwise, using N to determine the size of the shapes, the method should print the
following output shapes. Note that there are spaces between each star.

Contenu connexe

Plus de praveenvezella1

Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf
 Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf
Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdfpraveenvezella1
 
conociendo un biosensor �Con qu� procesos celulares se relacion.pdf
 conociendo un biosensor �Con qu� procesos celulares se relacion.pdf conociendo un biosensor �Con qu� procesos celulares se relacion.pdf
conociendo un biosensor �Con qu� procesos celulares se relacion.pdfpraveenvezella1
 
Conjugation, transduction, and transformation are important mechanism.pdf
 Conjugation, transduction, and transformation are important mechanism.pdf Conjugation, transduction, and transformation are important mechanism.pdf
Conjugation, transduction, and transformation are important mechanism.pdfpraveenvezella1
 
Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf
 Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf
Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdfpraveenvezella1
 
Conclusi�n para espectrofot�metro (Necesito una conclusi�n par.pdf
 Conclusi�n para espectrofot�metro  (Necesito una conclusi�n par.pdf Conclusi�n para espectrofot�metro  (Necesito una conclusi�n par.pdf
Conclusi�n para espectrofot�metro (Necesito una conclusi�n par.pdfpraveenvezella1
 
Condensed balance sheet and income statement data for Vaughn Corporat.pdf
 Condensed balance sheet and income statement data for Vaughn Corporat.pdf Condensed balance sheet and income statement data for Vaughn Corporat.pdf
Condensed balance sheet and income statement data for Vaughn Corporat.pdfpraveenvezella1
 
Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf
 Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf
Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdfpraveenvezella1
 
Complex Geologic Profile Make a geologle profle using the map and.pdf
 Complex Geologic Profile Make a geologle profle using the map and.pdf Complex Geologic Profile Make a geologle profle using the map and.pdf
Complex Geologic Profile Make a geologle profle using the map and.pdfpraveenvezella1
 
Complete the following table to find the ending inventory under the D.pdf
 Complete the following table to find the ending inventory under the D.pdf Complete the following table to find the ending inventory under the D.pdf
Complete the following table to find the ending inventory under the D.pdfpraveenvezella1
 
Complete the following ReheapUp function. template void HeapType roo.pdf
 Complete the following ReheapUp function. template void HeapType roo.pdf Complete the following ReheapUp function. template void HeapType roo.pdf
Complete the following ReheapUp function. template void HeapType roo.pdfpraveenvezella1
 
Computer Programming I with Python What to do Open your IDLE and dev.pdf
 Computer Programming I with Python What to do Open your IDLE and dev.pdf Computer Programming I with Python What to do Open your IDLE and dev.pdf
Computer Programming I with Python What to do Open your IDLE and dev.pdfpraveenvezella1
 
Complete the following heapsort function template void HeapSort (Item.pdf
 Complete the following heapsort function template void HeapSort (Item.pdf Complete the following heapsort function template void HeapSort (Item.pdf
Complete the following heapsort function template void HeapSort (Item.pdfpraveenvezella1
 
Compute gross profit for the month of January for Laker Company for t.pdf
 Compute gross profit for the month of January for Laker Company for t.pdf Compute gross profit for the month of January for Laker Company for t.pdf
Compute gross profit for the month of January for Laker Company for t.pdfpraveenvezella1
 
Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf
 Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf
Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdfpraveenvezella1
 
Complete the following heapsort function template void HeapSort(ItemT.pdf
 Complete the following heapsort function template void HeapSort(ItemT.pdf Complete the following heapsort function template void HeapSort(ItemT.pdf
Complete the following heapsort function template void HeapSort(ItemT.pdfpraveenvezella1
 
Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf
 Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf
Complete the crossword puzzle that follows. Across 2. Electronic lin.pdfpraveenvezella1
 
COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf
 COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf
COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdfpraveenvezella1
 
Complete the balance sheet and sales information in the table for Est.pdf
 Complete the balance sheet and sales information in the table for Est.pdf Complete the balance sheet and sales information in the table for Est.pdf
Complete the balance sheet and sales information in the table for Est.pdfpraveenvezella1
 
Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf
 Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf
Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdfpraveenvezella1
 
Complete parts (a) and (b) below. The number of dogs per household in.pdf
 Complete parts (a) and (b) below. The number of dogs per household in.pdf Complete parts (a) and (b) below. The number of dogs per household in.pdf
Complete parts (a) and (b) below. The number of dogs per household in.pdfpraveenvezella1
 

Plus de praveenvezella1 (20)

Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf
 Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf
Consider a 2-curve with df=17. Obtain the 2-value that has area 0.10 .pdf
 
conociendo un biosensor �Con qu� procesos celulares se relacion.pdf
 conociendo un biosensor �Con qu� procesos celulares se relacion.pdf conociendo un biosensor �Con qu� procesos celulares se relacion.pdf
conociendo un biosensor �Con qu� procesos celulares se relacion.pdf
 
Conjugation, transduction, and transformation are important mechanism.pdf
 Conjugation, transduction, and transformation are important mechanism.pdf Conjugation, transduction, and transformation are important mechanism.pdf
Conjugation, transduction, and transformation are important mechanism.pdf
 
Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf
 Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf
Concert marketing GSUs Rialto Center for the Performing Arts wanted.pdf
 
Conclusi�n para espectrofot�metro (Necesito una conclusi�n par.pdf
 Conclusi�n para espectrofot�metro  (Necesito una conclusi�n par.pdf Conclusi�n para espectrofot�metro  (Necesito una conclusi�n par.pdf
Conclusi�n para espectrofot�metro (Necesito una conclusi�n par.pdf
 
Condensed balance sheet and income statement data for Vaughn Corporat.pdf
 Condensed balance sheet and income statement data for Vaughn Corporat.pdf Condensed balance sheet and income statement data for Vaughn Corporat.pdf
Condensed balance sheet and income statement data for Vaughn Corporat.pdf
 
Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf
 Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf
Comsder two indmiduals, Rove and Sharon, who produce fish and coconut.pdf
 
Complex Geologic Profile Make a geologle profle using the map and.pdf
 Complex Geologic Profile Make a geologle profle using the map and.pdf Complex Geologic Profile Make a geologle profle using the map and.pdf
Complex Geologic Profile Make a geologle profle using the map and.pdf
 
Complete the following table to find the ending inventory under the D.pdf
 Complete the following table to find the ending inventory under the D.pdf Complete the following table to find the ending inventory under the D.pdf
Complete the following table to find the ending inventory under the D.pdf
 
Complete the following ReheapUp function. template void HeapType roo.pdf
 Complete the following ReheapUp function. template void HeapType roo.pdf Complete the following ReheapUp function. template void HeapType roo.pdf
Complete the following ReheapUp function. template void HeapType roo.pdf
 
Computer Programming I with Python What to do Open your IDLE and dev.pdf
 Computer Programming I with Python What to do Open your IDLE and dev.pdf Computer Programming I with Python What to do Open your IDLE and dev.pdf
Computer Programming I with Python What to do Open your IDLE and dev.pdf
 
Complete the following heapsort function template void HeapSort (Item.pdf
 Complete the following heapsort function template void HeapSort (Item.pdf Complete the following heapsort function template void HeapSort (Item.pdf
Complete the following heapsort function template void HeapSort (Item.pdf
 
Compute gross profit for the month of January for Laker Company for t.pdf
 Compute gross profit for the month of January for Laker Company for t.pdf Compute gross profit for the month of January for Laker Company for t.pdf
Compute gross profit for the month of January for Laker Company for t.pdf
 
Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf
 Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf
Compute the folosing ratibe for 2022 and 2021 . Ihound cament rotis a.pdf
 
Complete the following heapsort function template void HeapSort(ItemT.pdf
 Complete the following heapsort function template void HeapSort(ItemT.pdf Complete the following heapsort function template void HeapSort(ItemT.pdf
Complete the following heapsort function template void HeapSort(ItemT.pdf
 
Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf
 Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf
Complete the crossword puzzle that follows. Across 2. Electronic lin.pdf
 
COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf
 COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf
COMPLETE THE TABLE An investment is providing a scholarship worth $4.pdf
 
Complete the balance sheet and sales information in the table for Est.pdf
 Complete the balance sheet and sales information in the table for Est.pdf Complete the balance sheet and sales information in the table for Est.pdf
Complete the balance sheet and sales information in the table for Est.pdf
 
Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf
 Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf
Complete It T Cells and MHC Molecules Fill in the blanks to complete.pdf
 
Complete parts (a) and (b) below. The number of dogs per household in.pdf
 Complete parts (a) and (b) below. The number of dogs per household in.pdf Complete parts (a) and (b) below. The number of dogs per household in.pdf
Complete parts (a) and (b) below. The number of dogs per household in.pdf
 

Dernier

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
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
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Dernier (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
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 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Complete the parts in a single file. Name your classes Week3 and yo.pdf

  • 1. Complete the parts in a single file. Name your classes Week3 and your files Week3. Java. After you are done, upload a one file named Week3. java, which should contain the all implemented methods. Part I ( 50 points) Write a method named diceSum which takes an integer value N as a parameter, throws a fair dice N times, sums the lowest two values, and then prints the result in the console. Part II ( 50 points) Write a method named makeShape that takes an odd integer value N as a parameter. If input value N is not an odd value print "Input should be an odd number.". Otherwise, using N to determine the size of the shapes, the method should print the following output shapes. Note that there are spaces between each star.