Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BD 1 3 1 . Krio Java klas we d n k l Polygon Di yuza f input di valyu d n we g

BD13"1. Krio Java klas we dn kl Polygon Di yuza f input di valyu dn we gt bold d ya. Diklar di vribul dn we yu nid f yuz dn. Di nmba f di sayd dn. Validt se di nmba f di sayd dn na 34. If di valyu input na." nto 34, dn di program wit msej ""Invalid number of sides"" A. If di nmba f di sayd dn na 3, aks di yuza f di lng we tri sayd dn gt (yu go nid vribul fni sayd) Kalkul di perimita f di trayangul n display am yuz wan diskrtif sntns B. If di nmba f di sayd na 4, aks di yuza f di lng we 2 sayd dn (yu go nid vribul fni sayd) Ditarmin frm dis if di plign na skwea rktnj Kalkul di perimita f di 4 sayd plign (Hint: Dn kl di perimita f rktnj n skwea difrn we) Aydentify di plign = skwea vs rktnj Display di perimita yuz wan diskrtif sntns Mek sh se yu inklud if in na rktnj skwea na di autput stetmnt gzampul 1: Input nmba f di sayd dn: 3 sayd 1=2 sayd 2=4 sayd 3=5 Di perimita f di trayangul na 11(if yu de tray f di kstra kredit, di autput na dis kes go bi...) Dis nto rayt trayangul gzampul 2: Input nmba f di sayd dn: 4 sayd 1=2 sayd 2=2 Di perimita f di skwea na 8gzampul 3: Input nmba f di sayd dn: 4 sayd 1=3 sayd 2=6 Di perimita f di rktnj na 18
2. Rayt wan Java klas f impruv dn tin ya:
Gi wan de na di wik we dn kd as 0=Sun, 1=Mn,2=Tue, ...6=Sat, n wan bulian we de sho if wi de na vaykeshun, st wan int vribul we de sho ustm di alam klok f ring.
Wikde, dn f st di alam to 7n di wiknd i f bi 10
If wi de na vaykeshun: den na wikde i f bi 10n wiknd i f bi 0.
Display wan sht msej we de tl di psin we de yuz am bt di rizin f dis klas.
Gi di psin we de yuz am di rayt instrkshn f di input valyu dn
Display di autput insay diskriptiv sntns we inklud us tm dn dn st di alam.
If di int vayribul st to ziro, display ""Di alam dn f"".
gzampul:
Input: 1.
De: Na di 3
Vaykeshun: na lay".

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Identify the critical elements in a performance management system

Answered: 1 week ago

Question

Identify the skills necessary for effective coaching

Answered: 1 week ago