Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment you will create a class to represent a persons name along with a variety of methods for returning strings containing variants of

For this assignment you will create a class to represent a persons name along with a variety of methods for returning strings containing variants of the name. You should then create a driver program to create at least two Name objects, passing in four strings to each. One of the Names should be your own. For each of the name objects, the driver should then call each of the methods described below and display the strings returned in a manner similar to the example below. Note that the methods that make up the Name class DO NOT DISPLAY the names but only return Strings to the caller that represent the name specified. Class Name -prefix:String -first:String -middle:String -last:String +Name(String, String, String, String) +getShortName(): String +getFullName(): String +getFormalName(): String +getInitials(): String +getLastCommaFirst(): String Example: Created two names Name #1: Short name: Nathan Drake Full name: Nathan Francis Drake Formal name:Dr.Nathan Francis Drake Initials: NFD Last, First: Drake, Nathan Name #2: Short name: Fannie Farmer Full name: Fannie Francis Farmer Formal name: Mrs. Fannie Francis Farmer Initials: FFF Last, First: Farmer, Fannie

My bad it is Javascript for this programming language.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions