Lab Report Questions Unit 3 New Format (1)
Lab Report Questions Unit 3 New Format (1)
Instructions:
Create your new repository on GitHub and push your lab solution to GitHub with new
branch for each lab set.
Share your repository to [email protected] as a collaborator.
Print and attach your updated GitHub screenshot into lab set
Format
● Cover (Print)
● GitHub Screenshot
● Lab Question –hand written
● Introduction –hand written
● Syntax and Format –hand written
● Code –hand written
● Output(Print)- With full URL
Lab-3
Compiled by: Basanta Chapagain – BCA Scripting Language 4th SEM [[email protected]]
Create getInfo method (a getter) that will return information about the bike in the
following format: “$brand $model ($year)”.
Create getWeight method that will return weight in grams. Make this method
configurable so that it accepts one argument which by default is false. If it is true,
the weight should be returned in kilograms and if it is false (default), it should
return weight in grams. Create a setter method for the weight property. The
weight property stores the weight in grams. Create two objects from the Bicycle
class and set values for all properties. Print each bike’s information. Print each
bike’s weight in kilograms. Print each bike’s weight in grams.
3. Create a class called Student. The class should have:
Compiled by: Basanta Chapagain – BCA Scripting Language 4th SEM [[email protected]]
$prefix / $number". Create a class called User that implements the HasInfo
interface. The class should have 2 public properties: name and surname. The class
should have 2 private properties: address and phone (instances from the classes
above). The getInfo() method in this class should call the getInfo() methods from
the Address and Phone class respectively.
The output of this method should be:
"User: $firstName $lastName Address: street $street, number $number,
city $city Number: $prefix / $number"
Create 1 objects from each class. Call the getInformation method from the User
object to see the above output.
6. Create 3 classes – User, AdminUser and Customer.
class User
class Customer
class AdminUser
Create objects from each class. Print the full name and is_admin values for each object,
and additionally the location (city, state and country) for the customer objects only.
Compiled by: Basanta Chapagain – BCA Scripting Language 4th SEM [[email protected]]
7. Implement interface in PHP with specific properties (e.g., radius for Circle class and side
for Square class) to ensure that multiple classes provide their own implementations of a
method (e.g., calculateArea), while leveraging these properties for calculations.
8. Create a webpage that has different button to implement different jQuery effect methods :
hide,show,toggle,fadeIn, fadeOut, fadeToggle, slideUp, slideDown, slideToggle,animate
9. Create web page that has registration form, validate according to following rules using
jQuery.
a. Form field: Name, Address, Username, Email, Password, Website, Phone,
Gender(Radio), Course(Dropdown),
b. Name Validation: We check to make sure the name field is not empty and does
not contain any numbers.
c. Username Validation: We check to make sure the username field is not empty and
does not contain any spaces and special character except underscore (_).
d. Phone Validation: We check to make sure the phone field is not empty, does not
contain any character except numbers, and should start with [98/97/96].
e. Gender Validation: We check the gender field is not empty.
f. Address Validation: We check that the address field is not empty.
g. Email Validation: We make sure that the email field is not empty and that it
includes the “@” symbol.
h. Password Validation: We ensure that the password field is not empty and that the
password is at least eight characters long with at least one digit, one upper case
character, one lowercase character and one special character.
i. Course Selection Validation: We check that a course has been selected from a
dropdown list.
10. Create a form asking users to enter userid and password. On submit of the form the page
should submit the data to backend page written in PHP(use ajax). Note that you are
submitting the form using JQuery so page should not reload or redirect. If submitted data
is valid then the login form should show welcome message by hiding the input boxes,
otherwise it should ask the user to try again.
11. Write program to display content from bca.txt (description related to BCA) file into
webpage using AJAX based on JavaScript.
12. Write program to display content from
(https://freetestapi.com/api/v1/movies)URL using AJAX based on
JavaScript with following design
ID Title Poster Year Genre Rating Director Country Language Actors
13. Create webpage that ask username for password reset, when user types username, page
must display either username available or not into database table using AJAX using
XMLHttpRequest object.
Compiled by: Basanta Chapagain – BCA Scripting Language 4th SEM [[email protected]]
14. Create webpage that has country and city dropdown box, when user select country system
must list city name according to country using AJAX using XMLHttpRequest object.
15. Write program to display content from bca.txt (description related to BCA) file into
webpage using AJAX based on JavaScript.
16. Prepare report that shows the steps of installation of WordPress and Joomla CMS. (print)
17. Prepare report that shows the steps of creating post and page into WordPress and Joomla
CMS.(print)
18. Prepare report that shows the steps of create and manage menu WordPress and Joomla
CMS. (print)
19. Create blog website using WordPress or Joomla.
Thank you
Compiled by: Basanta Chapagain – BCA Scripting Language 4th SEM [[email protected]]