This homework builds on the Business class that we used in lab, by asking you to write 10 methods for it. In the rough order you should attempt them:
public Business(String formalName, String informalName, String startDate)
public double getLatitude()public double getLongitude()
public String getName()
public boolean setLatitude(double latitude)
public boolean setLongitude(double longitude)
public Business(String formalName, String informalName, String startDate, doublelatitude, double longitude)
public int getStartDay()public int getStartMonth()public int getStartYear()

Full descriptions of each method can be found in the documentation in the code. Google will likely be necessaryfor the last three methods.Note that no test cases will be provided on the autograder.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

/* Constructor that fully specifies a business. If _either_ the latitude
* or longitude is invalid, both should be set to 0. See the set functions
* for the valid ranges of each coordinate.
* @param formalName    The formal name of the business.
* @param informalName The informal name of the business.
* @param startDate    The start date of the business, in MM/DD/YYYY format.
* @param latitude      The latitude coordinate of the business.
* @param longitude    The longitude coordinate of the business.
public Business(String formalName, String informalName, String startDate,
double latitude, double longitude) {

this.formalName = formalName;
this.informalName = informalName;
this.startDate = startDate;

if(latitude >= -90 && latitude <= 90) {
}else {

if(longitude >= -180 && longitude <= 180) {
}else {

By purchasing this solution you'll be able to access the following files:

50% discount

$10.00 $5.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats