Create a small Java sample program (two classes) that compiles and runs under package nordicid_samples.
Requirements
Implement two Java source files inside /app/src/nordicid_samples:
Common.java
Xerxes.java
Both files must declare the package nordicid_samples at the top.
Common.java must provide at least one public static utility method (for example, a method that returns a short status or greeting string). It should be implemented using only the Java standard library.
Xerxes.java must provide a public class with a public static void main(String[] args) method. The main method must:
Run without command-line arguments (no required input).
Use at least one method from Common (call the utility method you created) to obtain information.
Print a short, user-readable message to standard output that includes the information obtained from Common.
Exit normally (return code 0).
No external libraries are required; the code should compile with javac alone.
Expected inputs and outputs
Input: none (program is executed with no arguments).
Output: one or more lines on standard output. The first line should be a short text message indicating the program started or its status and should include the value returned from the Common utility method. Exact wording is flexible but should be clear/readable.
File locations and naming
Place your solution inside /app/:
/app/src/nordicid_samples/Common.java
/app/src/nordicid_samples/Xerxes.java
Notes
The test environment will compile the two source files and run nordicid_samples.Xerxes. Ensure package and class names are exact and that the code compiles under a standard Java toolchain (javac).
Keep the implementation simple and self-contained (use only java.* packages).
Tests
The following test script will be used to verify your solution:
bash
#!/bin/bash
@echo off
clear
if [ -d "./build" ]; then
mkdir -p ./build
fi
javac -cp .:./lib/* -d ./build src/nordicid_samples/Common.java src/nordicid_samples/Xerxes.java
if [ $? -eq 0 ]; then
java -cp ./lib/*:./build nordicid_samples.Xerxes
fi
read -p "Press any key to continue . . ."