Complete the following tasks: a. Design a class named ItemForSale that holds data about items placed for

Question:

Complete the following tasks:

a. Design a class named ItemForSale that holds data about items placed for sale on Carlos’s List, a classified advertising website. Fields include an ad number, item description, asking price, and phone number. Include get and set methods for each field. Include a static method that displays the website’s motto (“Sell Stuff Locally!”). Include two overloaded constructors as follows:

  • A default constructor that sets the ad number to 101, the asking price to $1, and the item description and phone number both to XXX
  •  A constructor that allows you to pass values for all four fields

Create the class diagram and write the pseudocode that defines the class.

b. Design an application that declares two ItemForSale objects using a different constructor version with each object. Display each Issue’s values and then display the motto.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: