Java Taskbook Level 9.6

Задание 1

Given some URL:

javaString url = "http://test.com/dir1/dir2/dir3/page.html";

Get the name of the first folder:

java"dir1"
Задание 2

Make a method that takes a number and returns that number in words. Let the function work with numbers up to 999. See the example:

javafunc(123); // will bring out 'one hundred twenty three'
Задание 3

Given a string containing two numbers and a mathematical operation between them:

java'10 + 20'

Write code that will calculate the result of the written mathematical operation.