Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

week 3 , week 5, week 7 please 1. Create a Java class with two subclasses (children). Each class should have at least one attribute

week 3 , week 5, week 7 please image text in transcribed
image text in transcribed
image text in transcribed
1. Create a Java class with two subclasses (children). Each class should have at least one attribute and a method. Parent class should have the attribute/method that is common to both children and children should have the attribute/method that is unique to what they represent. Write the main method to demonstrate the correct functionality of the code and to demonstrate that the children inherit from the parent class. Be sure to create a program different from any of the programs already posted by your classmates or the examples in-class materials. 2. Reply to another student's post. Modify the student's code by adding another child class with an attribute and a method that is unique to that object, or suggest a different child class. Write the main method to demonstrate the correct functionality of the additions. As you reply to the other students, try to reply to a post that does not have a reply yet, and if not; try to reply to a post with a fewer number of replies. Be sure to create a program different from any of the programs already posted by your classmates or the examples in the class materials. As you answer these questions, use proper Java naming convention (Camel case), name the class, attribute, and method in a meaningful way to represent the business meaning, and add comments to the Java code as applicable. The deliverables are the Java code and the documentation. The documentation is a single Microsoft Word document, or PDF containing the screenshot of the results obtained by running the code. Submit the answer to the primary question by Saturday so that the other students get the time to read your post and respond to it. In addition, submit the response to another student by the Tuesday deadline. Week 5 - Polymorphism: Overloading and Overriding 1. Use the Java hierarchy you posted in Week 3 (corrected based on any feedback you may have received) add one overriding method and one overloading. The main method should create an instance of the class and demonstrate the correct functionality of the overriding and overloading methods. 2. Replyxto another student's post. Suggest a different overloading or overriding method. Write the main method to demonstrate the correct functionality of the additions/modifications. As you reply to the other students, try to reply to a post that does not have a reply yet, and if not; try to reply to a post with a fewer number of replies. Be sure to create a program different from any of the programs already posted by your classmates or the examples in the class materials. As you answer these questions, use proper Java naming convention (Camel case), name the class, attribute, and method in a meaningful way to represent the business meaning, and add comments to the Java code as applicable. The deliverables are the Java code and the documentation. The documentation is a single Microsoft Word document, or PDF containing the screenshot of the results obtained by running the code. Submit the answer to the primary question by Saturday so that the other students get the time to read your post and respond to it. In addition, submit the response to another student by the Tuesday deadline. 1. Use the Java hierarchy you posted in week 5 (corrected based on any feedback you may have received). Add a user-defined exception that can be thrown by one of the methods as part of the validation or error checking. The main method should then create an instance of the class and call the method in such a way that the exception is thrown (e.g. invalid input or state of the system). Submit your program as an attached .java file and post a screenshot to show that you have been able to successfully run that program. Make sure your submission adheres to the Submission Requirements document

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions