![]() ![]() For example: $calc = new Calculator( 3, 4) echo Of the student present in “Student.xml" file.Ĭlass that can accept two values, then add, subtract, multiply them or divide in [.doc) Write a XML Script to print the names ii) Get the output of this Document to theĭocument in another format i.e. Solve following questions (Use "Student.xml" file) Get_declared_classes().get_class_methods()and get_class_vars). Introspection for examining classes and objects.(use function Print students detail of specific course in tabular format afteraccepting course as input. (Use the concept of Class)ī)Write a PHP script tocreate student.xml file which contains student roll no, name, address, collegeand course. ![]() If no input specified the assignment tells you what values to put.A)Write a PHP script tocreate a simple calculator that can accept two numbers and perform operationslike add, subtract, multiplication. Based on the input calculate the fahrenheitTemp, celsiusTemp like I did in the setDegree. Use the instructions of the assignment to create the 4 constructors. Meaning that your set methods should have arguments and will pass that argument to the class variable. When you set the degree (by Constructor or be a set Method), use the scale to see if it is Celsius or Fahrenheit and use the appropriate formula: public void setDegrees(float degree) So don't put any calculations in your get Methods. So you will use the scale to determine that and calculate the results accordingly. When you have a degree as a parameter you don't know if it is in Celsius or in Fahrenheit. ![]() IF ANYONE WULD BE ABLE TO HELP ME WITH MY ERRORS IN MY CONSTRUTOR METHOD OR AS LEAST LET ME KNOW WHAT I DID WRONG THAT WOULD GREATLY BE APPRECIATED. Be sure to invoke each of the constructors, to include at least one case where the 2 temperatures are the same and one where they are different. Write a driver program that tests all the methods.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |