SlideShare a Scribd company logo
1 of 8
Module Six Assignment Guidelines and Rubric.html
Overview
Many Java programs that you create will receive and process
user input. In order to ensure that user input is accurate, you
will need to use input validation and exception handling. For
example, if you ask for a zip code, you want to ensure the user
inputs a five-digit number. In this activity, you are given
“buggy” code for a paint program that calculates the number of
cans of paint required to paint a wall, given the wall’s height
and width. You will need to debug the code and improve it by
adding code to validate user input and handle exceptions.
Prompt
For this assignment, you will complete the paint program by
debugging the original code and adding code that validates user
input and handles exceptions. Use the Uploading Files to
Eclipse and the Downloading Files From Eclipse tutorials to
help you with this project.DebuggingOpen the Virtual Lab by
clicking on the link in the Virtual Lab Access module. Then
open your IDE. Upload the Paint1.zip folder and review the
code for the Paint1.java file.Find and fix the three errors in the
given code.Use the input values below to test your program. If
you found and fixed all errors, your output should exactly match
what is below.
TIP: When you run your program in Eclipse, it will prompt you
to enter input in the Console window. If you cannot find this
window, go to Window, then Show View, then Console.
Input Validation and Exception HandlingReview the code,
looking for the two code blocks where user input is
required.Implement a do-while loop in both blocks of code to
ensure that input is valid and any exceptions are handled.
TIP: Consider using a try-catch block for exception handling,
but it is not required.Use the two sample invalid inputs below to
test your program. Your program should respond to each by
prompting the user to enter valid input. This should continue to
loop until valid input is received.
THINK: Why is 0 invalid input for this problem? What is the
user being asked to input?
Guidelines for Submission
Attach your completed Paint1.java file to the assignment
submission page.
Module Six Assignment RubricCriteriaProficient (100%)Needs
Improvement (75%)Not Evident (0%)ValueDebuggingDebugs a
class so that no errors remain and calculations work
correctlyMeets some “Proficient” criteria, but with errors or
exclusions such as one or two remaining bugsDoes not attempt
criterion30Input Validation and Exception HandlingAdds loops
to validate all user input and handle exceptions so that code
passes all test casesMeets most “Proficient” criteria, but with
errors; areas for improvement may include ability to handle all
test casesDoes not attempt criterion70Total:100%
course_documents/Uploading Files to Eclipse Tutorial.pdf
Uploading Files to Eclipse
This tutorial will guide you through the process of uploading a
project into Eclipse via the STEM Lab.
1. Open the STEM Lab and select the Launch button for the
Java Programming app. The virtual
environment can take a couple of minutes to load.
2. Once the STEM Lab opens, be sure your browser window is
in full-screen mode. Select the
upload icon on the STEM Lab tool bar.
3. In the File upload window, select a destination folder by
clicking the Upload button. This is
where the file will appear when you upload it. For this example,
we will select Desktop.
4. Next, you are provided with a File Upload dialog box.
Navigate to and select the file you want to
upload. Then, click the Open button. In this example, we’ve
selected the studentproject.zip file.
5. Once the file uploads, it will be listed in the File Upload
window and in the destination folder
you selected. In this example, the studentproject.zip file appears
in the File upload window, and
the destination folder is the Desktop.
6. Close the File upload dialog window.
7. Locate the studentproject.zip folder. In this case, it is saved
on the Desktop. Right-click on the
folder and select Extract All…
8. This will bring up a dialog box asking you to select a
destination for your extracted files. In this
example, the default location is the Desktop. Click Extract,
which will create an unzipped folder
in the destination you have selected.
9. Next, open Eclipse by double-clicking the Eclipse icon
located on the Desktop.
10. Select the Launch button in the Eclipse Launcher window to
open Eclipse.
11. From the File menu, select Open Projects from File System.
This will open up a dialog window.
12. You will use the Import dialog window to navigate to the
project you uploaded. Next to the
Import Source text box, click the Directory… button to browse
for your project folder.
13. In the dialog box, navigate to the destination folder where
you uploaded your project. In this
example, the destination folder is the Desktop. Select your
project folder and click the OK
button.
14. After selecting the file to import, you should see the
folder’s address in the Import Source
textbox. Select the Finish button in the Import dialog window.
15. To access the project files, navigate to the Package Explorer
workspace. You can view and open
your project files in this workspace.
a) In the Package Explorer workspace, click on the arrow next
to the project folder to view the
files. In this example, the folder is called studentproject.
b) To open your files in the Package Explorer workspace and
begin working, double-click on
each class file. Each file will have its own tab, so you can
easily switch back and forth
between them. Your project is now in Eclipse and ready for you
to use!
course_documents/Paint1.zip
Paint1.javaPaint1.javaimport java.util.Scanner;
publicclassPaint1{
publicstaticvoid main(String[] args){
Scanner scnr =newScanner(System.in);
double wallHeight =0.0;
double wallWidth =0.0;
double wallArea =0.0;
double gallonsPaintNeeded =0.0;
finaldouble squareFeetPerGallons =350.0;
// Implement a do-while loop to ensure input is valid
// Prompt user to input wall's height
System.out.println("Enter wall height (feet): ");
wallHeight = scnr.nextDouble();
// Implement a do-while loop to ensure input is valid
// Prompt user to input wall's width
System.out.println("Enter wall width (feet): ");
wallHeight = scnr.nextDouble();
// Calculate and output wall area
wallArea = wallHeight * wallWidth;
System.out.println("Wall area: square feet");
// Calculate and output the amount of paint (in gallons) needed t
o paint the wall
gallonsPaintNeeded = wallArea/squareFeetPerGallons;
System.out.println("Paint needed: "+ gallonspaintneeded +" gall
ons");
}
}
PastedImage_hgg7htmfhhn15bogqcv5xekee1negxqt0015147613
1.png
PastedImage_ybyd88qyk3okvpib5colytubnaluhllu00151476131.
png
PastedImage_ri7i3ykzjq7b5ezw2wwpoymx34jv4hab0015147613
1.png
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx

More Related Content

Similar to Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx

Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Mohamed Essam
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaAli Baba
 
Cis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comCis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comBaileyao
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6comp274
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manualnahalomar
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6helpido9
 
I phone first app ducat
I phone first app ducatI phone first app ducat
I phone first app ducatPragati Singh
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Robin O'Brien
 
International Institute of technology (android)
International Institute of technology (android)International Institute of technology (android)
International Institute of technology (android)Nazih Heni
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Supplement2d netbeans6
Supplement2d netbeans6Supplement2d netbeans6
Supplement2d netbeans6olveraadrian82
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Unit2 java
Unit2 javaUnit2 java
Unit2 javamrecedu
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introductionSireesh K
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web applicationPramod Rathore
 
DotNet unit testing training
DotNet unit testing trainingDotNet unit testing training
DotNet unit testing trainingTom Tang
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipsenga
 

Similar to Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx (20)

Intro to programing with java-lecture 1
Intro to programing with java-lecture 1Intro to programing with java-lecture 1
Intro to programing with java-lecture 1
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Cis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.comCis 170 Effective Communication / snaptutorial.com
Cis 170 Effective Communication / snaptutorial.com
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
 
I phone first app ducat
I phone first app ducatI phone first app ducat
I phone first app ducat
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
International Institute of technology (android)
International Institute of technology (android)International Institute of technology (android)
International Institute of technology (android)
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Supplement2d netbeans6
Supplement2d netbeans6Supplement2d netbeans6
Supplement2d netbeans6
 
Supplement2d netbeans6
Supplement2d netbeans6Supplement2d netbeans6
Supplement2d netbeans6
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Unit2 java
Unit2 javaUnit2 java
Unit2 java
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introduction
 
Test Complete
Test CompleteTest Complete
Test Complete
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web application
 
DotNet unit testing training
DotNet unit testing trainingDotNet unit testing training
DotNet unit testing training
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipse
 

More from roushhsiu

Most women experience their closest friendships with those of th.docx
Most women experience their closest friendships with those of th.docxMost women experience their closest friendships with those of th.docx
Most women experience their closest friendships with those of th.docxroushhsiu
 
Morgan and Dunn JD have hired you to assist with a case involvin.docx
Morgan and Dunn JD have hired you to assist with a case involvin.docxMorgan and Dunn JD have hired you to assist with a case involvin.docx
Morgan and Dunn JD have hired you to assist with a case involvin.docxroushhsiu
 
Mortality rates vary between the Hispanic community and the gene.docx
Mortality rates vary between the Hispanic community and the gene.docxMortality rates vary between the Hispanic community and the gene.docx
Mortality rates vary between the Hispanic community and the gene.docxroushhsiu
 
Moreno Industries has adopted the following production budget for th.docx
Moreno Industries has adopted the following production budget for th.docxMoreno Industries has adopted the following production budget for th.docx
Moreno Industries has adopted the following production budget for th.docxroushhsiu
 
Most people have a blend of leadership styles that they use. Some le.docx
Most people have a blend of leadership styles that they use. Some le.docxMost people have a blend of leadership styles that they use. Some le.docx
Most people have a blend of leadership styles that they use. Some le.docxroushhsiu
 
Moral rights as opposed to legal rights are not dependent on a polit.docx
Moral rights as opposed to legal rights are not dependent on a polit.docxMoral rights as opposed to legal rights are not dependent on a polit.docx
Moral rights as opposed to legal rights are not dependent on a polit.docxroushhsiu
 
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docx
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docxMontasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docx
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docxroushhsiu
 
Module Outcome  You will be able to describe the historical force.docx
Module Outcome  You will be able to describe the historical force.docxModule Outcome  You will be able to describe the historical force.docx
Module Outcome  You will be able to describe the historical force.docxroushhsiu
 
Molière believed that the duty of comedy is to correct human vices b.docx
Molière believed that the duty of comedy is to correct human vices b.docxMolière believed that the duty of comedy is to correct human vices b.docx
Molière believed that the duty of comedy is to correct human vices b.docxroushhsiu
 
Module One Making Budgetary DecisionsDirectionsBased on the i.docx
Module One Making Budgetary DecisionsDirectionsBased on the i.docxModule One Making Budgetary DecisionsDirectionsBased on the i.docx
Module One Making Budgetary DecisionsDirectionsBased on the i.docxroushhsiu
 
Monitoring Data and Quality ImprovementAnswer one of two que.docx
Monitoring Data and Quality ImprovementAnswer one of two que.docxMonitoring Data and Quality ImprovementAnswer one of two que.docx
Monitoring Data and Quality ImprovementAnswer one of two que.docxroushhsiu
 
Monitoring Global Supply Chains† Jodi L. Short Prof.docx
Monitoring Global Supply Chains†   Jodi L. Short Prof.docxMonitoring Global Supply Chains†   Jodi L. Short Prof.docx
Monitoring Global Supply Chains† Jodi L. Short Prof.docxroushhsiu
 
Morality Relativism & the Concerns it RaisesI want to g.docx
Morality Relativism & the Concerns it RaisesI want to g.docxMorality Relativism & the Concerns it RaisesI want to g.docx
Morality Relativism & the Concerns it RaisesI want to g.docxroushhsiu
 
Module 9 content You will perform a history of a cardiac pro.docx
Module 9 content You will perform a history of a cardiac pro.docxModule 9 content You will perform a history of a cardiac pro.docx
Module 9 content You will perform a history of a cardiac pro.docxroushhsiu
 
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docx
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docxModule Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docx
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docxroushhsiu
 
Module Assignment Clinical Decision Support SystemsLearning Outcome.docx
Module Assignment Clinical Decision Support SystemsLearning Outcome.docxModule Assignment Clinical Decision Support SystemsLearning Outcome.docx
Module Assignment Clinical Decision Support SystemsLearning Outcome.docxroushhsiu
 
MONTCLAIR UNIVERSITYLAWS 362 LEGAL WRITING MIDTERM.docx
MONTCLAIR UNIVERSITYLAWS 362  LEGAL WRITING   MIDTERM.docxMONTCLAIR UNIVERSITYLAWS 362  LEGAL WRITING   MIDTERM.docx
MONTCLAIR UNIVERSITYLAWS 362 LEGAL WRITING MIDTERM.docxroushhsiu
 
MODULE 8You will perform a history of a respiratory problem th.docx
MODULE 8You will perform a history of a respiratory problem th.docxMODULE 8You will perform a history of a respiratory problem th.docx
MODULE 8You will perform a history of a respiratory problem th.docxroushhsiu
 
Most organizations, including hospitals, adopt both Mission and Visi.docx
Most organizations, including hospitals, adopt both Mission and Visi.docxMost organizations, including hospitals, adopt both Mission and Visi.docx
Most organizations, including hospitals, adopt both Mission and Visi.docxroushhsiu
 
More like this Abstract TranslateFull Text Translate.docx
More like this Abstract TranslateFull Text Translate.docxMore like this Abstract TranslateFull Text Translate.docx
More like this Abstract TranslateFull Text Translate.docxroushhsiu
 

More from roushhsiu (20)

Most women experience their closest friendships with those of th.docx
Most women experience their closest friendships with those of th.docxMost women experience their closest friendships with those of th.docx
Most women experience their closest friendships with those of th.docx
 
Morgan and Dunn JD have hired you to assist with a case involvin.docx
Morgan and Dunn JD have hired you to assist with a case involvin.docxMorgan and Dunn JD have hired you to assist with a case involvin.docx
Morgan and Dunn JD have hired you to assist with a case involvin.docx
 
Mortality rates vary between the Hispanic community and the gene.docx
Mortality rates vary between the Hispanic community and the gene.docxMortality rates vary between the Hispanic community and the gene.docx
Mortality rates vary between the Hispanic community and the gene.docx
 
Moreno Industries has adopted the following production budget for th.docx
Moreno Industries has adopted the following production budget for th.docxMoreno Industries has adopted the following production budget for th.docx
Moreno Industries has adopted the following production budget for th.docx
 
Most people have a blend of leadership styles that they use. Some le.docx
Most people have a blend of leadership styles that they use. Some le.docxMost people have a blend of leadership styles that they use. Some le.docx
Most people have a blend of leadership styles that they use. Some le.docx
 
Moral rights as opposed to legal rights are not dependent on a polit.docx
Moral rights as opposed to legal rights are not dependent on a polit.docxMoral rights as opposed to legal rights are not dependent on a polit.docx
Moral rights as opposed to legal rights are not dependent on a polit.docx
 
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docx
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docxMontasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docx
Montasari, R., & Hill, R. (2019). Next-Generation Digital Forens.docx
 
Module Outcome  You will be able to describe the historical force.docx
Module Outcome  You will be able to describe the historical force.docxModule Outcome  You will be able to describe the historical force.docx
Module Outcome  You will be able to describe the historical force.docx
 
Molière believed that the duty of comedy is to correct human vices b.docx
Molière believed that the duty of comedy is to correct human vices b.docxMolière believed that the duty of comedy is to correct human vices b.docx
Molière believed that the duty of comedy is to correct human vices b.docx
 
Module One Making Budgetary DecisionsDirectionsBased on the i.docx
Module One Making Budgetary DecisionsDirectionsBased on the i.docxModule One Making Budgetary DecisionsDirectionsBased on the i.docx
Module One Making Budgetary DecisionsDirectionsBased on the i.docx
 
Monitoring Data and Quality ImprovementAnswer one of two que.docx
Monitoring Data and Quality ImprovementAnswer one of two que.docxMonitoring Data and Quality ImprovementAnswer one of two que.docx
Monitoring Data and Quality ImprovementAnswer one of two que.docx
 
Monitoring Global Supply Chains† Jodi L. Short Prof.docx
Monitoring Global Supply Chains†   Jodi L. Short Prof.docxMonitoring Global Supply Chains†   Jodi L. Short Prof.docx
Monitoring Global Supply Chains† Jodi L. Short Prof.docx
 
Morality Relativism & the Concerns it RaisesI want to g.docx
Morality Relativism & the Concerns it RaisesI want to g.docxMorality Relativism & the Concerns it RaisesI want to g.docx
Morality Relativism & the Concerns it RaisesI want to g.docx
 
Module 9 content You will perform a history of a cardiac pro.docx
Module 9 content You will perform a history of a cardiac pro.docxModule 9 content You will perform a history of a cardiac pro.docx
Module 9 content You will perform a history of a cardiac pro.docx
 
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docx
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docxModule Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docx
Module Assessment 4 TANM ApplicationsBUS2 190Last name, Fir.docx
 
Module Assignment Clinical Decision Support SystemsLearning Outcome.docx
Module Assignment Clinical Decision Support SystemsLearning Outcome.docxModule Assignment Clinical Decision Support SystemsLearning Outcome.docx
Module Assignment Clinical Decision Support SystemsLearning Outcome.docx
 
MONTCLAIR UNIVERSITYLAWS 362 LEGAL WRITING MIDTERM.docx
MONTCLAIR UNIVERSITYLAWS 362  LEGAL WRITING   MIDTERM.docxMONTCLAIR UNIVERSITYLAWS 362  LEGAL WRITING   MIDTERM.docx
MONTCLAIR UNIVERSITYLAWS 362 LEGAL WRITING MIDTERM.docx
 
MODULE 8You will perform a history of a respiratory problem th.docx
MODULE 8You will perform a history of a respiratory problem th.docxMODULE 8You will perform a history of a respiratory problem th.docx
MODULE 8You will perform a history of a respiratory problem th.docx
 
Most organizations, including hospitals, adopt both Mission and Visi.docx
Most organizations, including hospitals, adopt both Mission and Visi.docxMost organizations, including hospitals, adopt both Mission and Visi.docx
Most organizations, including hospitals, adopt both Mission and Visi.docx
 
More like this Abstract TranslateFull Text Translate.docx
More like this Abstract TranslateFull Text Translate.docxMore like this Abstract TranslateFull Text Translate.docx
More like this Abstract TranslateFull Text Translate.docx
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 

Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx

  • 1. Module Six Assignment Guidelines and Rubric.html Overview Many Java programs that you create will receive and process user input. In order to ensure that user input is accurate, you will need to use input validation and exception handling. For example, if you ask for a zip code, you want to ensure the user inputs a five-digit number. In this activity, you are given “buggy” code for a paint program that calculates the number of cans of paint required to paint a wall, given the wall’s height and width. You will need to debug the code and improve it by adding code to validate user input and handle exceptions. Prompt For this assignment, you will complete the paint program by debugging the original code and adding code that validates user input and handles exceptions. Use the Uploading Files to Eclipse and the Downloading Files From Eclipse tutorials to help you with this project.DebuggingOpen the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your IDE. Upload the Paint1.zip folder and review the code for the Paint1.java file.Find and fix the three errors in the given code.Use the input values below to test your program. If you found and fixed all errors, your output should exactly match what is below. TIP: When you run your program in Eclipse, it will prompt you to enter input in the Console window. If you cannot find this window, go to Window, then Show View, then Console. Input Validation and Exception HandlingReview the code, looking for the two code blocks where user input is required.Implement a do-while loop in both blocks of code to ensure that input is valid and any exceptions are handled.
  • 2. TIP: Consider using a try-catch block for exception handling, but it is not required.Use the two sample invalid inputs below to test your program. Your program should respond to each by prompting the user to enter valid input. This should continue to loop until valid input is received. THINK: Why is 0 invalid input for this problem? What is the user being asked to input? Guidelines for Submission Attach your completed Paint1.java file to the assignment submission page. Module Six Assignment RubricCriteriaProficient (100%)Needs Improvement (75%)Not Evident (0%)ValueDebuggingDebugs a class so that no errors remain and calculations work correctlyMeets some “Proficient” criteria, but with errors or exclusions such as one or two remaining bugsDoes not attempt criterion30Input Validation and Exception HandlingAdds loops to validate all user input and handle exceptions so that code passes all test casesMeets most “Proficient” criteria, but with errors; areas for improvement may include ability to handle all test casesDoes not attempt criterion70Total:100% course_documents/Uploading Files to Eclipse Tutorial.pdf Uploading Files to Eclipse This tutorial will guide you through the process of uploading a project into Eclipse via the STEM Lab. 1. Open the STEM Lab and select the Launch button for the Java Programming app. The virtual
  • 3. environment can take a couple of minutes to load. 2. Once the STEM Lab opens, be sure your browser window is in full-screen mode. Select the upload icon on the STEM Lab tool bar. 3. In the File upload window, select a destination folder by clicking the Upload button. This is where the file will appear when you upload it. For this example, we will select Desktop. 4. Next, you are provided with a File Upload dialog box. Navigate to and select the file you want to upload. Then, click the Open button. In this example, we’ve selected the studentproject.zip file. 5. Once the file uploads, it will be listed in the File Upload window and in the destination folder you selected. In this example, the studentproject.zip file appears in the File upload window, and the destination folder is the Desktop.
  • 4. 6. Close the File upload dialog window. 7. Locate the studentproject.zip folder. In this case, it is saved on the Desktop. Right-click on the folder and select Extract All… 8. This will bring up a dialog box asking you to select a destination for your extracted files. In this example, the default location is the Desktop. Click Extract, which will create an unzipped folder in the destination you have selected. 9. Next, open Eclipse by double-clicking the Eclipse icon located on the Desktop. 10. Select the Launch button in the Eclipse Launcher window to open Eclipse.
  • 5. 11. From the File menu, select Open Projects from File System. This will open up a dialog window. 12. You will use the Import dialog window to navigate to the project you uploaded. Next to the Import Source text box, click the Directory… button to browse for your project folder. 13. In the dialog box, navigate to the destination folder where you uploaded your project. In this example, the destination folder is the Desktop. Select your project folder and click the OK button. 14. After selecting the file to import, you should see the folder’s address in the Import Source textbox. Select the Finish button in the Import dialog window.
  • 6. 15. To access the project files, navigate to the Package Explorer workspace. You can view and open your project files in this workspace. a) In the Package Explorer workspace, click on the arrow next to the project folder to view the files. In this example, the folder is called studentproject. b) To open your files in the Package Explorer workspace and begin working, double-click on each class file. Each file will have its own tab, so you can easily switch back and forth between them. Your project is now in Eclipse and ready for you to use! course_documents/Paint1.zip Paint1.javaPaint1.javaimport java.util.Scanner; publicclassPaint1{ publicstaticvoid main(String[] args){ Scanner scnr =newScanner(System.in); double wallHeight =0.0; double wallWidth =0.0; double wallArea =0.0; double gallonsPaintNeeded =0.0; finaldouble squareFeetPerGallons =350.0;
  • 7. // Implement a do-while loop to ensure input is valid // Prompt user to input wall's height System.out.println("Enter wall height (feet): "); wallHeight = scnr.nextDouble(); // Implement a do-while loop to ensure input is valid // Prompt user to input wall's width System.out.println("Enter wall width (feet): "); wallHeight = scnr.nextDouble(); // Calculate and output wall area wallArea = wallHeight * wallWidth; System.out.println("Wall area: square feet"); // Calculate and output the amount of paint (in gallons) needed t o paint the wall gallonsPaintNeeded = wallArea/squareFeetPerGallons; System.out.println("Paint needed: "+ gallonspaintneeded +" gall ons"); } } PastedImage_hgg7htmfhhn15bogqcv5xekee1negxqt0015147613 1.png PastedImage_ybyd88qyk3okvpib5colytubnaluhllu00151476131. png PastedImage_ri7i3ykzjq7b5ezw2wwpoymx34jv4hab0015147613 1.png