1 / 4

PRG 420 Week 2 Individual Coding a Program Containing if then and switch//tutorfortune.com

PRG 420 Week 2 Individual Coding a Program Containing if then and switch//tutorfortune.com<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-420-week-2-individual-coding-a-program-containing-if-then-and-switch-1<br><br>PRG 420 Week 2 Individual Coding a Program Containing if then and switch<br> <br><br>Resources:<br><br><br>Week Two Coding Assigment Zip File (starter code for this assignment that includes placeholders)<br> <br><br>Week Two Recommended Activity Zip File (examples of how to code a switch statement, an if-then-else statement, and how to construct a string to display text onscreen)<br> <br><br>For this assignment, you will apply what you learned in analyzing Javau2122 code so far in this course by writing your own Javau2122 program. The Javau2122 program you write should do the following:<br><br><br> <br><br>Accept user input that represents the number of sides in a polygon. Note: The code to do this is already written for you.<br> <br><br> <br><br>If input value is not between 3 and 5, display an informative error message<br> <br><br> <br><br>If input value is between 3 and 5, use a switch statement to display a message that identifies the correct polygon based on the number of sides matching the input number (e.g., triangle, rectangle, or polygon)<br> <br><br> <br><br>Complete this assignment by doing the following:<br><br> <br><br> <br><br> <br><br>Download tnd unzip ahe linked Week Two Coding Assigment Zip File.<br> <br><br> <br><br>Read the file carefully, especially the explanatory comments of what the existing code does.<br> <br>Add your name and the date in the multi-line comment header<br><br>Refer to the following linked Week Two Recommended Activity Zip File to see examples of how to code all of the Javau2122 statements (i.e., switch, println(), and if-then-else) you will need to write to complete this assignment.<br><br>Replace the following lines with Java code as directed in the file: <br><br>LINE 1<br> <br>LINE 2<br><br><br>Comment each line of code you add to explain what you intend the code to do.<br> <br><br>Test and modify your Javau2122 program until it runs without errors and produces the results as described above.<br> <br><br> <br><br>Note: Refer to this weeku2019s analyzing code assignment if you need help.<br><br>Submit your Java application file using the Assignment Files tab.<br> PRG 420 Week 2 Individual Coding a Program Containing if then and switch<br>Click on below link to buy<br>https://tutorfortune.com/products/prg-420-week-2-individual-coding-a-program-containing-if-then-and-switch-1<br><br>

dettol
Download Presentation

PRG 420 Week 2 Individual Coding a Program Containing if then and switch//tutorfortune.com

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PRG 420 Week 2 Individual Coding a Program Containing if then and switch//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/prg-420-week-2-individual-coding-a-program- containing-if-then-and-switch-1 P R G 4 2 0 We e k 2 I n d i v i d u a l C o d i n g a P r o g r a m C o n t a i n i n g i f t h e n a n d s w i t c h   R e s o u r c e s : We e k T w o C o d i n g A s s i g me n t Z i p F i l e ( s t a r t e r c o d e f o r t h i s a s s i g n me n t t h a t i n c l u d e s p l a c e h o l d e r s )   We e k T w o R e c o mme n d e d A c t i v i t y Z i p F i l e ( e x a mp l e s o f h o w t o c o d e a   s w i t c h   s t a t e me n t , a n   i f - t h e n - e l s e   s t a t e me n t , a n d h o w t o c o n s t r u c t a s t r i n g t o d i s p l a y t e x t o n s c r e e n )   F o r t h i s a s s i g n me n t , y o u w i l l   a p p l y   w h a t y o u l e a r n e d i n a n a l y z i n g J a v a ™ c o d e s o f a r i n t h i s c o u r s e b y w r i t i n g y o u r o w n J a v a ™ p r o g r a m. T h e J a v a ™ p r o g r a m y o u w r i t e s h o u l d d o t h e f o l l o w i n g :   A c c e p t u s e r i n p u t t h a t r e p r e s e n t s t h e n u mb e r o f s i d e s i n a p o l y g o n .   N o t e :   T h e c o d e t o d o t h i s i s a l r e a d y w r i t t e n f o r y o u .  

  2.   I f i n p u t v a l u e i s   n o t   b e t w e e n 3 a n d 5 , d i s p l a y a n i n f o r ma t i v e e r r o r me s s a g e     I f i n p u t v a l u e   i s   b e t w e e n 3 a n d 5 , u s e a   s w i t c h   s t a t e me n t t o d i s p l a y a me s s a g e t h a t i d e n t i fi e s t h e c o r r e c t p o l y g o n b a s e d o n t h e n u mb e r o f s i d e s ma t c h i n g t h e i n p u t n u mb e r ( e . g . , t r i a n g l e , r e c t a n g l e , o r p o l y g o n )     C o mp l e t e   t h i s a s s i g n me n t b y d o i n g t h e f o l l o w i n g :       D o w n l o a d t n d u n z i p a h e l i n k e d We e k T w o C o d i n g A s s i g me n t Z i p F i l e .     R e a d t h e fi l e c a r e f u l l y , e s p e c i a l l y t h e e x p l a n a t o r y c o mme n t s o f w h a t t h e e x i s t i n g c o d e d o e s .   A d d y o u r n a me a n d t h e d a t e i n t h e mu l t i - l i n e c o mme n t h e a d e r

  3. R e f e r t o t h e f o l l o w i n g l i n k e d We e k T w o R e c o mme n d e d A c t i v i t y Z i p F i l e t o s e e e x a mp l e s o f h o w t o c o d e a l l o f t h e J a v a ™ s t a t e me n t s ( i . e . , s w i t c h , p r i n t l n ( ) , a n d i f - t h e n - e l s e ) y o u w i l l n e e d t o w r i t e t o c o mp l e t e t h i s a s s i g n me n t . R e p l a c e t h e f o l l o w i n g l i n e s w i t h J a v a c o d e a s d i r e c t e d i n t h e fi l e :   L I N E 1   L I N E 2 C o mme n t e a c h l i n e o f c o d e y o u a d d t o e x p l a i n w h a t y o u i n t e n d t h e c o d e t o d o .   T e s t a n d mo d i f y y o u r J a v a ™ p r o g r a m u n t i l i t r u n s w i t h o u t e r r o r s a n d p r o d u c e s t h e r e s u l t s a s d e s c r i b e d a b o v e .     N o t e :   R e f e r t o t h i s w e e k ’ s a n a l y z i n g c o d e a s s i g n me n t i f y o u n e e d h e l p . S u b mi t   y o u r J a v a a p p l i c a t i o n fi l e u s i n g t h e A s s i g n me n t F i l e s t a b .   P R G 4 2 0 We e k 2 I n d i v i d u a l C o d i n g a P r o g r a m C o n t a i n i n g i f t h e n a n d s w i t c h Click on below link to buy

  4. https://tutorfortune.com/products/prg-420-week-2-individual-coding-a-program-https://tutorfortune.com/products/prg-420-week-2-individual-coding-a-program- containing-if-then-and-switch-1

More Related