Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone help me? In Java and a UML. Thank You 1 75 Assignment: Part 1 Use Word, PowerPoint, Excel, or any other program you
Can someone help me? In Java and a UML. Thank You
1 75 Assignment: Part 1 Use Word, PowerPoint, Excel, or any other program you would like to create an UML diagram for a class called Rectangle that will have 2 data items, length and width, and 5 worker methods called setLength(), setWidth(), getLength(), getWidth(), and getArea(). The class and methods are public, and the fields are private. All data are doubles. The methods setLength and set Width are void and the other three methods are doubles. There will be 1 constructor, the no-arg default one. Once you have created the UML, save it as a PDF called LastnameFirst InitalUML pdf. (Mine would be called KikuchiCUMLpdf Part 2 Use Netbeans to create the class based on the UML. Use the stru for How Have One Package with Multiple Classes in the Using Setter & Getter Methods and Building a Package with More Than One Class mini lecture to create a package that holds both the Rectangle class and a main class. The package's name will be called Rectangle. Hint: Look in your book in Revel to see Code Animation 9.1. A stv OG 8 1 2 75 en In the main class: 1. Above the class header, write a javadoc comment containing the integrity policy statement. Under the statement, but still in the block, type your first and last name for the signature, press Tab and type the date. You will not need to use underlining. You can see the integrity policy statement by going to Canvas: Modules: Help Files> Integrity Policy Statement. 2. Under the integrity statement, add comments on your program that show the title of the program (Rectangle), your first and last name, and the course name (CSC 230, Sec #). You may choose to use single line comments or a multiline docstring. Sec # will be your section #. 3. As the first print lines for your program under the main method, make sure that the run screen also prints the title of the program (Rectangle), your first and last name, and the course name (CSC 230, Sec #), and the program information as shown in the sample run screen. 4. When you call setLength() and set Width() in the main program, use the arguments of 2.5 and 5.2, respectively. 5. Your program must compile. Programs that do not compile will not be accepted. To Submit this homework: Go to your project folder, find the folder called Rectangle, and zip it. Turn in, via the Assignments area: 1. The UML called LastnameFirstInitalUMLpdf 2. The Rectangle.zip file 111 &tv SAMPLE RUN SCREEN (Variable values are shown as bold italics) Rectangle Christine Kikuchi CSC 230, Sec # 1 This program creates and uses a class called Rectangle. The Rectangle class has two constructors and 5 other methods. The setLength() method will use the constructor to set the length to 2.5. The set Width() method will use the constructor to set the width to 5.2. The getLength() method will return the length. The getWidth() method will return the width of the rectangle. The getArea() method will return the length * width. The rectangle's length is 2.5 The rectangle's width is 5.2 The rectangle's area is 13.0 Homework One Page 2 of 5 CSC 230 tv 8 0 3 /5 Grading Rubric UML The UML is saved in the format of LastnameFirstInitalUMLpdf, 2 The UML is not saved in the format of LastnameFirstInitalUMLpdf. 0 length and width are in UML with correct visibility modifiers and data types 2 length and width are not shown in the UML. 0 The two constructors are in UML with correct visibility modifiers length and width are in UML but do not have correct 4 visibility modifiers and/or data types The two constructors are in UML but do not 4 have correct visibility modifiers The worker methods are in UML but do not 5 have correct visibility modifiers and data types The two constructors are not in the UML 0 The worker methods: setLength(), setWidth(), getLength(), getWidth(), and getArea() are in UML with correct visibility modifiers and data types 3 The worker methodsare in not in the UML. 0 Package 0 3 75 Package The package is called Rectangle 2 The package is not called Rectangle 0 The package includes both classes, the Rectangle class & the main class. 5 The package does not include both classes. 0 Rectangle class The class is called Rectangle 2 The class is not called Rectangle 0 The class is declared correctly with the correct visibility modifier. The class is not declared correctly 0 The class is declared correctly 2 but does not have the correct visibility modifier. length & width are declared correctly but do not have 2 the correct visibility modifiers and data types. length & width are declared correctly using the correct visibility modifiers and data types. 1 length & width are not declared correctly.. 0 CSC 230 Homework One Page 3 of 5 homeWOFRISP92 Homework 1 Sprin... X 0 4 / 5 4 The default constructor is declared correctly and uses the correct name. 5 The default constructor is not declared correctly. The setter method setLength() is created correctly with the correct visibility modifier, data type, parameter, and body and does what it is expected to do. The setter method setLength() is created correctly but does not have the correct visibility modifier, The setter method setLength() is not created correctly and/or it does not do what it is expected to do. 0 data type, parameter, or body. The setter method setWidth() is created correctly but does not have the correct visibility modifier The setter method setWidth() is creato correctly with correct visibility modifier, data type, parameter, and body and does what it is expected to do. The setter method setWidth() is created not correctly and/or it does not do what it is expected to do. 0 data type, The getter method getLength() is created correctly with the correct visibility modifier, data type, and body and does what it is expected to do. parameter, or body. The getter method getLength() is created correctly 7 but does not have the correct visibility modifier, data type, or body. 3 The getter method getLength() is not created correctly and/or it does not do what it is expected to do. 0 95% rader Homework1Spring 2022 x Homework 1 Sprin 4/5 0 The getter method getWidth() is created correctly with the correct visibility modifier, data type, and body and does what it is expected to do. The getter method getWidth() is not created correctly and/or it does not do what it is expected to do. The getter method get Width() is created correctly but does not have the correct visibility modifier data type, or body. The getter method getArea() is created correctly 7 but does not have the correct visibility modifier data type, or body 0 The getter method getArea() is created correctly with the correct visibility modifier, data type, and body and does what it is expected to do. The getter method getArea( is not created correctly and/or it does not do what it is expected to do. CS3 Aanavinul na DAS stv MacBook Pro Q 22 2 A * %23 3 $ 4 % 5 & 7 ) O 2 6 00 8 9 W E R T Y U I 0 S D F G HJ L A 95% Acrobat Reader , RD Homework1Spring2022 TA x Homework 1 Sprin 5 16 2 0 The class is not called main. The class does not have the Javadoc comment that is the Academic Integrity statement 2 main class The class is called main. The class starts with a Javadoc comment that is the Academic Integrity statement Under the Academic Integrity statement, there are the comments that show the title of the program, the programmer's first and last name, and the course name and section #. The first print lines print the title of the program, the programmer's first and last name, and the course name and section #, and the program information as shown in the sample run screen The class does not have the comments that are the title of the program, the programmer's first and last name, and the course name and section # 2 The class does not have the print lines that show the title of the program, the programmer's first and last name, and the course name and section # 0 The rectangle object is 25 The rectangle object is not Jealoudest ty A 09 MacBook Pro esc Q 22 ) ! 1 23 A 2 $ 4 * 3 % 5 & 7 6 8 9 ) 0 Q W E R T Y U o A S D F G H J K L N X C V B N A 95% Acrobat Reader Homework Spring 2022 TE Homework Sprin... X 5 5 0 The rectangle object is declared correctly The rectangle object is not 4 declared correctly or not declared 4 The values of length and width are set using the correct methods from the Rectangle class The program uses a print line to invoke the getLength() method from the Rectangle class The values of length and width are not set using the correct methods from the Rectangle class. The program does not use a print line to invoke the getLength() method from the Rectangle class. 0 4 The program uses a print line to invoke the get Width method from the Rectangle class 4 st 0 The program does not use a print line to invoke the get Width() method from the Rectangle class. 4 The program uses a print line to invoke the getArea() method from the Rectangle class Output The program does not use a print line to invoke the getArea() method from the Rectangle class. 0 ty A MacBook Pro esc 22 ! 1 @ 2 # 3 A $ 4 L % 5 & 7 * 00 6 9 > 0 Q W E R T T Y U I 0 P A A S D F G I J K L : N X C V B N M > V - IN 95% Acrobat Reader 2 Homework Spring2022 x TB Homework 1 Sprin 0 4 The program uses a print line to invoke the getLength() method from the Rectangle class. The program does not use a print line to invoke the getLength() method from the Rectangle class. 0 4 The program uses a print line to invoke the getWidth() method from the Rectangle class. The program does not use a print line to invoke the get Width() method from the Rectangle class. The program does not use a print line to invoke the getArea() method from the Rectangle class. 4 0 The program uses a print line to invoke the getArea method from the Rectangle class. Output The run of the program looks like the sample. 4 The run of the program does not look like the sample. 0 CSC 230 Homework One Page 5 of 5 25 MacBook Pro esc a la ! 1 # 3 2 $ 4 & % 5 6 6 7 8 9 ) 0 Q W E R. T U I o { P A . S D F G H J K L : ; N X C V B N M 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started