Introductory to object-oriented programmin UE Past Papers Questions.
View All Courses |
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(1493) Question Category: Practical Create a Java application with class name Test1. That class should contain two integer variables declared as argument of a method called sum(). This method computes the sum of these two values variables. The method should display the results. In turn call the method in main(), passing the values of the two integer variables. Answer / Solution UNSOLVED |
|||||||||||||||||||||
(1494) Question Category: Short answers Given the following piece of Java codes, examine carefully , identify errors and fill them in the table below:
public static void giveName[String name, int size]{ System.out.printline(“Our product is ”+ name +” Our product size is ”+size); } public static void Main(String[] args){ GiveName(“Asaki”,) }
Answer / Solution UNSOLVED |
|||||||||||||||||||||
|
|||||||||||||||||||||
(1692) Question Category: Practical Write a Java program called LipaKwaSimu that performs transactions as described below;
Answer / Solution Unlock |
|||||||||||||||||||||
(1710) Question Category: Practical In a class called Test1, write a method called showRemark, this method takes one argument called rowMark. It check the given row mark and give a remark on the condition that , if row mark is greater than or equal to 50 but less than or equal to 100 it assigns PASS, if row mark is greater or equal to 0 but less than 49 it assigns FAIL, otherwise INVALID MARKS. Invoke this method into the main method and let the user enter the row marks from the keyboard. Create separate file with a class called Test2 that inherits Test1 class. The new class should override the showRemark method to just display simple message “This is overriding concept” . Create an object that uses this method. Save , compile and execute your files. Answer / Solution Unlock |
|||||||||||||||||||||
|
|||||||||||||||||||||
(4367) Question Category: Multiple choices Which of the following is not a type of class?
Answer / Solution UNSOLVED |
|||||||||||||||||||||
|
News & Updates | Recently
Recent Updates |
---|
2024-05-02: questionsQuestions Uploaded on 2024-05-02 |
2024-03-29: questionsQuestions Uploaded on 2024-03-29 |
2024-03-19: questionsQuestions Uploaded on 2024-03-19 |