JAVA Consider the following class : public class Store { Public final double SALES_TAX_RATE = 0.06; private String name; public Store(String newName) { setName ( newName); } public String getName () { return name; } public void setName (String newName) { name = newName; } public String toString() { return “name: “ + name; } } Write a class encapsulating a web store, which inherits from Store. A web store has the following additional attributes: an Internet Address and the programming language in which the website was written. Code the constructor and the toString() method of the new class. You also need to include a client class to test your code.
JAVA
Consider the following class :
public class Store
{
Public final double SALES_TAX_RATE = 0.06;
private String name;
public Store(String newName)
{
setName ( newName);
}
public String getName ()
{
return name;
}
public void setName (String newName)
{
name = newName;
}
public String toString()
{
return “name: “ + name;
}
}
Write a class encapsulating a web store, which inherits from Store. A web store has the following additional attributes: an Internet Address and the
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images