Create a Flowchart and pseudocode.

Create a class whose main method creates three arrays. The first array will contain five kinds of flowers - petunia, pansy, rose, violet, and carnation. The second array will contain the cost of each flower, respectively, 50 cents, 75 cents, $1.50, 50 cents, and 80 cents per flower. The third array will contain the number of flowers in stock of 5, 0, 10, 3 and 15. The main() method will call the readInput() method which will request that the user enter the desired flower. If the flower is not within the first array and message will appear and the program will end. If the flower is in a array, the user will be prompted to enter the number of flowers. If the user enters a number less than one, they will be requested to reenter the number of flowers until they enter a number greater than zero.
After all requirements are met for the input, the readInput() method will call the checkStock() method. This method will check to see if the number of flowers entered was in stock. A message will display if there are enough in stock.
Once the sale is complete the type of flower, number of flowers, and the total cost will display.

Here is the flowchart for the given scenario:

```
+-------------------------------+
| Main Method |
+-------------------------------+
|
|
|
+--------------------------v------------------------+
| Create Arrays |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| readInput() |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| Check if Flower is valid |
| If invalid, Display error message and end |
| If valid, Prompt user for number of flowers |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| Check if Number is valid |
| If less than 1, Prompt user to re-enter number |
| If greater than 0, Call checkStock() method |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| checkStock() method |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| Check if number of flowers are in stock |
| If not enough, Display error message |
| If enough, Calculate total cost and display |
+--------------------------+------------------------+
|
|
|
+--------------------------v------------------------+
| Display Sale Details and End Program |
+-------------------------------------------------+
```

Here is the pseudocode for the given scenario:

```java
class FlowerSale {
public static void main(String[] args) {
String[] flowers = {"petunia", "pansy", "rose", "violet", "carnation"};
double[] costs = {0.50, 0.75, 1.50, 0.50, 0.80};
int[] stock = {5, 0, 10, 3, 15};

String flower = readInput();
int numFlowers = getNumFlowers();

if (flowerExists(flowers, flower)) {
if (isValidNumber(numFlowers)) {
if (checkStock(stock, flowers, flower, numFlowers)) {
double totalCost = calculateCost(costs, flowers, flower, numFlowers);
displaySaleDetails(flower, numFlowers, totalCost);
} else {
displayOutOfStockMessage();
}
} else {
displayInvalidNumberMessage();
}
} else {
displayInvalidFlowerMessage();
}
}

static String readInput() {
// Prompt user to enter a flower
// Save user input in a variable and return it
}

static int getNumFlowers() {
// Prompt user to enter number of flowers
// Save user input in a variable and return it as an integer
}

static boolean flowerExists(String[] flowers, String flower) {
// Check if the entered flower exists in the array
// Return true if it exists, false otherwise
}

static boolean isValidNumber(int numFlowers) {
// Check if the entered number is valid (greater than 0)
// Return true if it is, false otherwise
}

static boolean checkStock(int[] stock, String[] flowers, String flower, int numFlowers) {
// Check if the number of flowers requested are in stock
// Return true if there are enough, false otherwise
}

static double calculateCost(double[] costs, String[] flowers, String flower, int numFlowers) {
// Calculate the total cost based on the flower, number of flowers, and cost per flower
// Return the total cost as a double
}

static void displaySaleDetails(String flower, int numFlowers, double totalCost) {
// Display the sale details (type of flower, number of flowers, and total cost) to the user
// End the program
}

static void displayOutOfStockMessage() {
// Display an error message to the user indicating that the flower is out of stock
}

static void displayInvalidNumberMessage() {
// Display an error message to the user indicating that the entered number is invalid
}

static void displayInvalidFlowerMessage() {
// Display an error message to the user indicating that the entered flower is invalid
}
}
```

Please note that the pseudo code is not complete and some details might need to be filled in based on the specific requirements of the program.

Sure! Here's a flowchart illustrating the process described:

```
+-------------+
| Start/ main |
+------+------+
|
|
+--------v---------+
+----------------| Call readInput() |
| +--------+---------+
| |
+--->+---+ |
| Yes | |
| | |
| +---v---+ |
| | Flower | |
| | exists | |
| +---+---+ |
| | |
| |No |
| | |
| +---v---+ |
| | Display | |
| | message | |
| +---+---+ |
| | |
| | |
| | |
| +---v---+ |
| | End | |
| +--------+ |
| |
| |
| +----v-----+
| | Call check|
| | Stock |
| +----+-----+
| |
| +----v-----+
| | Display |
| | message |
| +----+-----+
v |
+---+---+ |
| Check | |
| Stock | |
+---+---+ |
| |
+-----v---+ |
| Display | |
| flower | |
+-----+---+ |
| |
| |
| |
+-----v---+ |
| Call | |
| check | |
| stock | |
| function| |
+-----+---+ |
| |
| +---+-----------+
| |No |
| | V
| | +------------+
| | | Re-enter |
| | | number |
| | +------------+
| |
| Yes
| +------+-------+
| | Display |
+------>| flower |
| stock |
+---+----------+
|
+---------v-------+
|Call readInput() |
+--------+--------+
|
|
+----------------v----------------+
| Calculate total cost & display |
| type of flower & number sold |
+--------------------------------+
|
|
+--------v--------+
| End |
+-----------------+
```

And here's the pseudocode implementation:

```
class FlowerShop:
flowers = ['petunia', 'pansy', 'rose', 'violet', 'carnation']
cost = [0.50, 0.75, 1.50, 0.50, 0.80]
stock = [5, 0, 10, 3, 15]

def main():
flower, quantity = readInput()
if flower not in flowers:
displayMessage("Invalid flower entered. Program terminated.")
return

while quantity < 1:
displayMessage("Invalid quantity entered. Please reenter.")
flower, quantity = readInput()

if checkStock(flower, quantity):
total_cost = calculateCost(flower, quantity)
displaySale(flower, quantity, total_cost)

def readInput():
flower = input("Enter the desired flower: ")
quantity = int(input("Enter the number of flowers: "))
return flower, quantity

def checkStock(flower, quantity):
index = flowers.index(flower)
if quantity <= stock[index]:
displayMessage("Flower in stock. Proceed with transaction.")
return True
else:
displayMessage("Insufficient stock. Program terminated.")
return False

def calculateCost(flower, quantity):
index = flowers.index(flower)
return cost[index] * quantity

def displaySale(flower, quantity, total_cost):
displayMessage(f"Sale complete. Type of flower: {flower}. Number of flowers: {quantity}. Total cost: ${total_cost}")

def displayMessage(message):
print(message)

FlowerShop.main()
```

I hope this helps! Let me know if you have any further questions.