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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started