Question: Question Consider the following class diagram. Picture # title: string + setData(title); void + displayTitle (void): void Photograph - photographerID: int - camera: string +

Question

Consider the following class diagram.

Picture

# title: string

+ setData(title); void

+ displayTitle (void): void

Photograph

- photographerID: int

- camera: string

+ Photograph (title, photographerID, camera)

+ ~ Photograph ()

+ setData (title); void

+ setPhotographerID (photographerID); void

+ setCamera (camera); void

+ displayTitle (void): void

+ displayPhotographer (void): void

+ displayCamera (void): void

Figure 1

You are requested to write code for the following tasks based on the class diagram given above.

Create a Picture class. The Picture class should contains:

Variables

Functions

Create a Photograph class. The Photograph class should contain:

Variables

Functions

Constructor

Destructor

Create a form that allow user to enter the Photograph details. Write code to perform form validation as follows:

Use appropriate input types to capture the title, photographerID and camera from the user.

Alert the user if any of the data fields are empty.

Use HTML pattern to ensure the photographerID input must be minimum of three and maximum of five digits data.

Use HTML pattern to ensure the camera input must be minimum of three and maximum of five-alphanumeric data.

Create an object of Photograph Class. Assign the user input to the Photograph object.

Create a database named Photograph. Insert the user input into the table named Photograph. You need to insert two photograph records into the table.

Present the two records in a table. Display the title, phtographID and camera values of the Photograph records. Apply the JQuery fadeIn and fadeOut effects in your table design.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!