[SOLVED] java cs330 Creating Polyhedra

$25

File Name: java_cs330_Creating_Polyhedra.zip
File Size: 273.18 KB

5/5 - (1 vote)

2017/11/27 Creating Polyhedra (Java)

sphere 1cylinder 2 1sphere 4cylinder 2 3composite 3
sphere 3sphere 5sphere 7
composite 2cylinder 1 2
sphere 5sphere 3

sphere 1

cylinder 2 3

:seirtne tupni nordehylop n yb dewollof neht si tI .desopmoc si ti hcihw fo ardehylop fo ,n ,rebmun eht gnitneserper regetni na yb denfied su epahs etisopmoc A

:mrof eht ekat dluow 3 suidar dna 2 thgieh htiw rednilyc A

:suidar a yb denfied si erehps A .setubirtta etairporppa lla dnanordehylop eht fo eman eht ,.e.idrowyek a sa dettamrof si enil nordehylop hcaE

.noisnetxeehtsatad.htiwdemanneebevahdluoc elfi siht ,.e.iyrartibra eb yam xuniL no snoisnetxe eliF .txt.1ardehylop ,elfi eno morf atad sdaer margorp ehT

.avaJ ni ,melborp railimis a gnivlos eb lliw uoy ,tnemngissa siht nI .3 tnemngissA morf melborp emas eht si sihT .ssalc etisopmoC eht yllacfiicepsyhcrareiH nordehyloP eht gnitelpmoc eb lliw uoy ,esicrexe siht nI

.stcejbo etairporppa eht stcurtsnoc dna elfi tupni na morf ardehyloP fo sepyt eerht sekat margorp a htiw slaed tnemngissa sihT

ydenneK samohT )avaJ( ardehyloP gnitaerC

.stnemngissa ni gninrut no snoitcurtsni lareneg eht daeR

melborP ehT 1

gnittimbuS4.2 seliF3.2 gnidarG2.2 segakcaP1.2

scinahceM 2 sksaTruoY3.1 tuptuO2.1 tupnI1.1

tupnI 1.1

melborP ehT 1

:stnetnoC

2017/11/27 Creating Polyhedra (Java)

composite 2cylinder 1 2

sphere 5

Original Polyhedra------------------------------------------------------------[Sphere] (2.0, 2.0, 2.0)->Radius: 1.0 Diameter: 2.0[Cylinder] (2.0, 2.0, 2.0)->Radius: 1.0 Height: 2.0[Sphere] (8.0, 8.0, 8.0)->Radius: 4.0 Diameter: 8.0[Cylinder] (6.0, 6.0, 2.0)->Radius: 3.0 Height: 2.0[Composite] (14.0, 14.0, 14.0)->3 polyhedra
[Sphere] (6.0, 6.0, 6.0)->Radius: 3.0 Diameter: 6.0[Sphere] (10.0, 10.0, 10.0)->Radius: 5.0 Diameter: 10.0[Sphere] (14.0, 14.0, 14.0)->Radius: 7.0 Diameter: 14.0
[Composite] (10.0, 10.0, 10.0)->2 polyhedra[Cylinder] (4.0, 4.0, 1.0)->Radius: 2.0 Height: 1.0[Sphere] (10.0, 10.0, 10.0)->Radius: 5.0 Diameter: 10.0
[Sphere] (6.0, 6.0, 6.0)->Radius: 3.0 Diameter: 6.0
Scaled Polyhedra (Clones)------------------------------------------------------------[Sphere] (4.0, 4.0, 4.0)->Radius: 2.0 Diameter: 4.0[Cylinder] (4.0, 4.0, 4.0)->Radius: 2.0 Height: 4.0[Sphere] (16.0, 16.0, 16.0)->Radius: 8.0 Diameter: 16.0[Cylinder] (12.0, 12.0, 4.0)->Radius: 6.0 Height: 4.0[Composite] (28.0, 28.0, 28.0)->3 polyhedra
[Sphere] (12.0, 12.0, 12.0)->Radius: 6.0 Diameter: 12.0[Sphere] (20.0, 20.0, 20.0)->Radius: 10.0 Diameter: 20.0[Sphere] (28.0, 28.0, 28.0)->Radius: 14.0 Diameter: 28.0
[Composite] (20.0, 20.0, 20.0)->2 polyhedra[Cylinder] (8.0, 8.0, 2.0)->Radius: 4.0 Height: 2.0[Sphere] (20.0, 20.0, 20.0)->Radius: 10.0 Diameter: 20.0
 java -jar CreatePolyhedra.jar polyhedra1.txt 2

make run

run

https://www.cs.odu.edu/~tkennedy/cs330/f17/Assts/polyhedra_java/index.html 2/4

.lacitnedi eb tsum stes owt ehT .noitulos ym yb detarenegtuptuoehtotnoitulosruoyybdetarenegtuptuoehterapmoc,noitulosruoydetelpmocevahuoyecnO

.selfi tupni tset nwo ruoy dna elfi tupni dedivorp eht htob htiw noitulos delipmoc eht nuR

.)evisnepxe era hcihw( sekortsyek rewef esu ot su swolla sihT .)uoy rof dnammoc tsrfi eht snur hcihw( elfiekam eht ni tegrat eht setucexe dnammoc rettal eht erehW

:epyt ,margorp siht nur ot ,txt.1ardehylop ni tpek si evoba atad elpmas eht fi ,elpmaxe roF

.detucexe si margorp eht nehw sretemarap enil-dnammoc sa deman era selfi owt esehT .dedivorp evah I noitulos elbatucexe elpmas eht nur ot si tuptuo detcepxe eht etareneg ot yaw tseisae ehT

:detareneg eb dluohs tuptuo gniwollof eht ,elfi tupni eht sa txt.1ardehylop htiw nur si margorp eht fI .ardehylop lla gnilacs fo tluser eht gnitsil troper A .2

.txt.1ardehylop morf daer erew taht ardehylop lla gnitsil troper A .1 .rehto eht retfa eno ,tuptuo dradnats ot nettirw stroper owt fo stsisnoc tuptuo ehT tuptuO 2.1 .demrof-llew si tupni llA .elfi tupni dilav a emussa yam uoY

ro

2017/11/27 Creating Polyhedra (Java)

clone scale toString

clone

package shapes;

~cs330/Assignments/polyhedra_java

https://www.cs.odu.edu/~tkennedy/cs330/f17/Assts/polyhedra_java/index.html 3/4

.sdnammoc fo ecneuqes rehto emos ro relipmoc rehto emos htiw delipmoc eb ylno nac ti taht yaw a hcus ni ecafretni ssalc etisopmoC eht egnahc ron ,selfi edoc ecruos rehto eht fo yna retla ton oD .elfiekam dedivorp eht yb detareneg sdnammoc noitalipmoc eht gnisu ,yrotcerid taht ni edoc rehto eht htiwsrevres xuniL ruo noyltcerroc elipmoc tsum edoc dettimbus ruoy taht etoN

.
ni ,revres xuniL tpeD SC a ot ni deggol era uoy fi ,ro yrotcerid siht ni raeppa tnemngissa siht rof seliF

.gnittamrof tuptuo sedulcni tsetsihT.1nahtretaergrotcafgnilacsadnaelfitupninevigsnurmargorpruoywohsetaulave400tseT

.gnittamrof tuptuo sdragersid tsetsihT.1nahtretaergrotcafgnilacsadnaelfitupninevigsnurmargorpruoywohsetaulave300tseT

.gnittamrof tuptuosedulcnitsetsihT.1forotcafgnilacsadnaelfitupninevigsnurmargorpruoywohsetaulave200tseT

.gnittamrof tuptuo sdragersidtsetsihT.1forotcafgnilacsadnaelfitupninevigsnurmargorpruoywohsetaulave100tseT

.tuptuollasdracsidtsetsihT.snurdnaselipmocedocruoytahtsmrfinoc000tseT

:elohwasamargorpruoyetaulave400hguorht000stseT

.2 tnemngissA & 1 tnemngissA ni saw ti naht retcirts si airetirc gnidarg ym hcus sA .avaJ ni esicrexe emas eht gnitaeper era uoY .3 tnemngissA morf melborp emas eht si sihT

.segakcap reporp esu ot egru eht gnitsiser tnemngissa eht fo trap edam ylticilpxe evah I ,revewoH .sey ,hsrah siht sI .yllacitamotua liaf lliw uoy ,egakcap eht egnahc uoy fI

,.g.e,senilegakcapynaddatonoD.esicrexesihtotsegakcapynadda/egnahcton oD .)egakcaP tluafeD eht ni edoc ecruos lla evael dna( segakcap reporp ogrof lliw ew ytirailimaf fo ekas eht roF

.1 elpmaxE 8 weiveR tisiveR .stnemmoc eht ni stnih eht etoN .etairporppa sa gnitadpu( rotcurtsnoc ypoc eht evomer ro ,rotcurtsnoc ypoc eht etelpmoc

rehtienacuoY.rotcurtsnocypocarofnoteleksadnanoitcnufenolcauoydedivorpevahItahtetoN .ssalc etisopmoC rof snoitcnuf dna , ,)noitrop rotcurtsnoc ypoc( etelpmoC sksaT ruoY 3.1

).margorp gninnur a ot sretemarap enil-dnammoc ylppus ot woh weiver ot deen yam uoy ,tnemnorivne tnempoleved ralimis a ro espilcE morf gninnur era uoy fI ./. eht timo dluow uoy ,metsys swodniW a nO(

avaj.etisopmoC :timbuS ot seliF

gnittimbuS 4.2

seliF 3.2

gnidarG 2.2

segakcaP 1.2

scinahceM 2

2017/11/27 Creating Polyhedra (Java)

https://www.cs.odu.edu/~tkennedy/cs330/f17/Assts/polyhedra_java/index.html 4/4

.)edoc gnilipmoc-non timbus ot detpo uoy fi( edoc ruoy gnilipmoc nehw deretnuocne srorre noitalipmoc yna edulcni lliw troper edarg yranimilerp sihT .nottub sedarG egap bew esruoc eht morf edarg ruoy kcehc ot elba eb osla lliw dna )tnuocca liame UDO ruoy ot( liame aiv edarg yranimilerp a eviecer lliw uoY .woleb nottub eht esu ,tnemngissa ruoy timbus oT

.vinU noinimoD dlO ,7102-5102

tnemngissa siht timbuS

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] java cs330 Creating Polyhedra
$25