This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code above removed for brevity | |
public class JUTC extends Fragment { | |
ExpandableListView expandableListView; | |
List<String> ListGroup; | |
HashMap<String, List<String>> listItem; | |
MainAdapter adapter; | |
TextView textView; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Create a base class called Person that has a derived class | |
* called Employee. The base class must have the following | |
* private members: first_name, middle_initial, last_name, | |
* gender and birth_date. Also, the derived class must have | |
* the following private members: employer, salary and | |
* employed_date. Include getter and setter member | |
* functions for all private members. Write a C++ program | |
* that uses the Employee class to create three (3) employees | |
* then print their details. You may add a member function to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Solution { | |
public static void main(String[] args) { | |
System.out.println("Hello, World."); | |
System.out.println("Hello, Java."); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Label; | |
import javafx.scene.text.Font; | |
import javafx.stage.Stage; | |
public class Main extends Application { | |
@Override | |
public void start(Stage stage) throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Countdown { | |
/* | |
Write a Java program that counts down how many days, hours, minutes and seconds | |
remain before your birthday. | |
https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html | |
1. Prompt the user to enter his/her birthday in following format (yyyy-mm-dd). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Calculable { | |
double add(double num1, double num2); | |
double subtract(double num1, double num2); | |
double multiply(double num1, double num2); | |
} | |
public class Calculator implements Calculable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.*; | |
abstract class Shape { | |
private String color; | |
abstract double getArea(); // method signature | |
} | |
class Circle extends Shape { | |
private double radius; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Write a program that prints all multiples of 5 | |
between 1 and 100 (including both 1 and 100). | |
*/ | |
public class Problem3 { | |
public static void main(String[] args) { | |
for(int i = 1; i <= 100; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/* | |
Write a program that outputs the appropriate value based on | |
the integer the user has entered. | |
Range Output | |
0 < n < 10 "blue” | |
10 < n < 20 "red” | |
20 < n < 30 "green” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
System.out.println("Enter your name: "); | |
String name = scan.nextLine(); |