Question: Part 1 Understand the Problem and Class Design with UML The client needs a program to store data on basket balls, including the brand name,


Part 1 Understand the Problem and Class Design with UML The client needs a program to store data on basket balls, including the brand name, color, and price in dollars and cents. Testing values for get and set methods are brand name: "Spaulding", color: "orange", and price 42.99 Testing values for overloaded constructor are brand name: "S-Mart", color: "red", and price 12.99 Using the word problem above, design a class with the needed fields, a no parameter constructor, an overloaded constructor with three parameters, and needed methods (gets sets). Document your design using a detailed UML Class diagram. Part 2 Write the Java code for the class Follow your UML class diagram and code the class you designed. Use Java coding conventions for identifiers: class, constructor, field, variable, and method names Mark fields private, constructor and methods public. Select and use appropriate data types for the fields as well as method parameters as needed. Comment your code as requested and demonstrated in the course. O Part 3 Test the class you created, using a main method in a separate class. Create a second class with an identifier that follows these instructions: o FullNameLabExam1Section Number o For example, a student with first name "Abc" and last name "Xyz" in section 123 would name the class as: AbcXyzLabExam1Section123, with resulting file name AbcXyzLabExam1Section 123.java Using this class with a method main, write some simple program tests to verify your designed class. o Instantiate one object based on your designed class using the default constructor and output the field values using the get methods. o Set a value into each field of the object, get a value from each field printing the field value(s) on screen o Instantiate a new object based on your designed class using the overloaded constructor and output the field values using the get methods. o There is no need for user input to the program, use literal values in the source code of your test program (within method main). Ensure that your full name is written out on screen after the tests above are run. o Use the testing values given above as part of the word problem. UML Class Diagram for testing class FullNameLabExam 1 Section Number +main(args: String().void Replace "FullName" with your full name as seen in ACSIS and replace "Section Number" with the section number for your lab period when you create this class with method main. For example a student named "Abc Xyz" in lab section 123 would name this class UML Class Diagram for testing class FullNameLabExam 1 Section Number tmain(args: String().void Replace "FullName" with your full name as seen in ACSIS and replace "Section Number" with the section number for your lab period when you create this class with method main. For example a student named "Abc Xyz" in lab section 123 would name this class: AbcxyzLabExam 1Section123 Page 2 of 4 Sample of expected program output (your program should be similar) Testing No Argument Constructor, Get, Set methods: Initial Object State Brand name : Color: Price: 0.0 Setting Brand name: Spaulding, color: orange, price: 42.99 Brand name: Spaulding Color: orange Price: 42.99 Testing Overloaded Constructor Brand name: S-Mart, color: red, price: 12.99 Brand name: S-Mart Color: red Price: 12.99 Program by Abs. Xyz
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
