Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9.3.8 I'm not sure how to start. Please answer all parts using the given format. Thank you! Exercise 9.3.8: Online Companies polete Let's Go! There

9.3.8 I'm not sure how to start. Please answer all parts using the given format. Thank you!
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Exercise 9.3.8: Online Companies polete Let's Go! There are many different types of companies out there so trying to make one class that fits them all would be a challenge. We are going to take a look at modeling out a general company with the company class and then customize that class with the Online Company subclass. The basic structure is set up for both of these classes. Your task is to complete these classes as specified in the comments of each class Onte complete, use the companyiester class to create a Company and onlineCompany object, then print each out using the toStringo 131 MacBook Pro s 3 4 5 6 7 8 9 0 E 20 T U Sandbox My Section Practice O Status: Not Submitted 9.3.8: Online Companies Save Submit Continue 1 public class Company Tester 2. 3 public static void main(String] args) { 5 6 7) FILES 8 D Company java D CompanyTester java Online Companyjava OP go 2 3 4 & 5 Status: Not Submitted LES Company Java Company Festejevs Online Companyjava 9.3.8: Online Companies Save Sutimit Canti 1. public class Company 2 3 private String name; 4 private String streetAddress; 5 private String city: 6 private String state; 7 8 // Set missing values to null 9 public Company (String nane) 10 11 3 12 I 13 public Company String name, String streetAddress, String city, Strin 15 16 1 17 18 public String getNameOL 19 20 } 21 22- / 23 Example output 24 123 Main St 25 Springfield, OH 26 * 27 public String address 28 29 3 30 31 14- 31 OP MacBook Pro ESC 188 SE EN 96 & 2 $ 4 3 5 6 7 8 W E R T U FILES Company D Company Tester Online Companyjava 22.. 11 12 13 14.ublic Company String nane, String streetAddress, String city, String state 15 16 17 18-ublic String getName 19 20 22 I 23 Example output: 24 123 Moin St 25 Springfield, CH 26 27-ublic String address 28 29 30 31. 32 Example output: 33 Widget Company 34 123 Main St 35 Springfield, OH 36 37.ublic String toStringo! 38 39 40 41 31 OP MacBook Pro SO 1 2 $ 4 3 5 & 7 6 8 Q W E R T Y Y U A S D F G H Z C V B. Status: Not Submitted a E FILES Company java Company Tester java Online Companyjava 9.3.8: Online Companies Save Sum 1. public class Online Company extends Company 2 3 private String webAddress: 4. 5 public Online Company String nane, String webAddress) 6 7 3 8 9 // Return the website address 10 11- public String address 12 13 14 15 16 Remember To get name from supercl use super.getNone 17 18 Example Output: 19 Codes 20 * www.codehs.com 21 */ 22 23- public String toString 24 25 3 26 ) 27 131 MacBook Pro * $ N 3 4 5 6 7 Q W E R T T Y

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

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

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions