Question: Write the program in Java. Write a class encapsulating the concept of a corporate name (for example, IBM) , assuming a corporate name has only
Write the program in Java.
Write a class encapsulating the concept of a corporate name (for example, "IBM") , assuming a corporate name has only one attribute: the corporate name itself). Include a constructor, the accessors and mutators and methods toString and equals. Include a method returning a potential domain name by adding "www" at the beginning and ".com" at the end. For instance, for the example "IBM" it should return "www.IBM.com". Write a client class to test all the methods in your class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
