Write the definition of a class Telephone . The class has no constructors, one instance variable of type String called number , and two static variables. One is of type int called quantity ; the other is of type double called total . Besides that, the class has one static method makeFullNumber . The method accepts two arguments, a String containing a telephone number and an int containing an area code. The method concatenates the two arguments in the following manner: First comes the area code, then a dash, then the telephone number. The method returns the resultant string.
chihwei 0 Newbie Poster
Recommended Answers
Jump to Postaccess modifiers...
Jump to Postdon't go rambling about things you don't understand...
The fact that you end your statement with several question marks means you shouldn't have made it...
All 8 Replies
stymiee 111 He's No Good To Me Dead Team Colleague
chihwei 0 Newbie Poster
jwenting 1,905 duckman Team Colleague
Chaster 2 Junior Poster in Training
msi_333 0 Newbie Poster
jwenting 1,905 duckman Team Colleague
msi_333 0 Newbie Poster
ProgrammersTalk 11 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.