Anda di halaman 1dari 2

WDVP ASSIGNMENT-III

1. Write a PHP code for addition of two matrices.

2. A phone number, such as (0870) 245-1285, can be thought of as having three parts: the area code (0870), the exchange (245) and the number (1285). Write a program that uses a class to store these three parts of a phone number separately. Call the class phone. Create two class objects of type phone. Initialize one, and have the input a number for the other one. Display both numbers.

3. Write a function reversit() which passes a string as a parameter and reverses the string using the procedure: first swap the first and last character of the string, then the second and second last characters and so on. Write a program to exercise reversit(). The program should get a string from the user. Call the reversit() and print out the result.

4. Write a PHP script for the following: Design a form to accept two numbers from the user. Give options to choose the arithmetic operation. Display the result on the next form.

5. Write a menu driven program to perform the following operations on associative arrays: i. Sort the array by values (changing the keys) in ascending, descending order. ii. Also sort the array by values without changing the keys. iii.Sort the different arrays at a glance using single function. iv. Merge the given arrays. v. Find the intersection of two arrays. vi. Find the union of two arrays. vii. Find set difference of two arrays.

6. Student Registration

The first page is Log-in page. This page should contain fields like Username and Password. Below that two options like Sign-up or Sign-in should be there. If Sign-Up is clicked then it should move to the Registration page (i.e., if the person is a new user) and it should contain at least ten fields like First name, Last name, Email-id, DOB, User Name, Password, Confirm Password etc., and once submitted info is saved. If Sign-in is clicked then match between Username and Password is checked. If yes, then it moves the Profile page. If No, it stays in the same page giving some error message If a person has successfully logged-in, the he will be in his profile page. In that page four options got to be there namely Edit Profile, View Profile, Change Password , Log out If Edit Profile is clicked, then it should ask for profile password and if there is a match then it moves to the Edit Profile page and certain info can be edited and saved. Else it stays back If View Profile is clicked, then it moves to the corresponding page and you will be allowed to see the details only. No modifications are allowed. If Change Password is clicked, then it moves to that page that has got three fields namely Old Password, New Password and Confirm New Password. Only if the old Password is correct then new password will be accepted. Else not. If Logout is pressed it should move to the logout page that contains User name and Password once again.

Anda mungkin juga menyukai