Help with Deleting Folders Script

Hi all new to the forums. Very beginner at shell scripting. What I'm trying to do is this:
Is the directory empty prior to removal of it? If not, inform the user that the directory is not empty and if the user wants to remove it remove or move the files in it first.

But I'm stuck.. It checks if its empty but how would I go about removing the directory after checking whether it is empty or not.

#!/bin/bash

echo "Please enter directory to be removed: "
read directory1

if [ "$(ls -A $directory1)" ]; then
echo -e "$directory1 is not empty!"

else 
echo -e "$directory1 is empty!"

if [ $directory1 ]
fi

Is this a homework assignment?

yes but i'm not asking for anybody to write it for me I just want to know how I would get started at least.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.