Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this php project. THE PROJECT MUST USE THE PHP TEMPLATE POSTED BELOW! 1. Create an object-oriented class in PHP that will

I need help with this php project. THE PROJECT MUST USE THE PHP TEMPLATE POSTED BELOW!

1. Create an object-oriented class in PHP that will represent a User. You should use User.php as the filename and the class within it should be called User. Note the uppercase U.

The User class should have the following private properties:usernamepasswordemailAddressisLoggedIn

The User class should have the following public methods (you may rename authenticate to login, if you would like):authenticate($username,$password)logout()getEmailAddress()getLoginStatus()

The getEmailAddress() method should return the current value of the class property emailAddress and getLoginStatus() should return the current value of the class property isLoggedIn.

At this time, the authenticate() and logout() methods do not need to contain any code.

2. Create a separate file to test the User class. That file should simply instantiate the User class and print the value returned from getLoginStatus().

Template.php:

$page = new Template("My Page");

$page->addHeadElement("");

$page->finalizeTopSection();

//Some libraries require things to be added before the closing body tag.

//Pretty much the same thing as addHeadElement//Use addBottomElement() for that. See the method in the Template class.

$page->finalizeBottomSection();

print $page->getTopSection();

print "

Some page-specific HTML goes here

";

print $page->getBottomSection();

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

More Books

Students also viewed these Databases questions

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago

Question

What did they do? What did they say?

Answered: 1 week ago