A local recording studion rents its facilities for $200 per hour. Management charges only for the number of minutes used. Create a project in which the input is the name of the group and the number of minutes it used the studio. Your program calculates the appropriate charges, accumulates the total charges for all groups, and computes the average charge and the number of groups that used the studio.

Form: Use labeled text boxes for the name of the group and the number of minutes used. The charges for the current group and the number of minutes used. The charges for the current group should be displayed formatted in a label (see formatcurrency hint below). Create a frame for the summary information. Inside the frame, display the total charges for all groups, the number of groups, and the average charge per group. Format all output appropriately (again, see formatcurrency hint below).

Code: Use a constant for the rental rate per minute.

import javax.swing.*;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.NumberFormat;

public class RecordingStudioProject extends JFrame {
private JPanel mainPanel;
private JPanel inputPanel;
private JPanel summaryPanel;
private JTextField groupNameField;
private JTextField minutesUsedField;
private JButton calculateButton;
private JLabel currentChargeLabel;
private JLabel totalChargesLabel;
private JLabel numberOfGroupsLabel;
private JLabel averageChargeLabel;

private double totalCharges = 0;
private int numberOfGroups = 0;

private static final double RENTAL_RATE_PER_MINUTE = 3.33; // Rental rate per minute in dollars

public RecordingStudioProject() {
setTitle("Recording Studio Charges");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(400, 300));

mainPanel = new JPanel(new BorderLayout());
inputPanel = new JPanel(new GridLayout(2, 2));
summaryPanel = new JPanel(new GridLayout(3, 2));

groupNameField = new JTextField();
minutesUsedField = new JTextField();
calculateButton = new JButton("Calculate");
currentChargeLabel = new JLabel();
totalChargesLabel = new JLabel();
numberOfGroupsLabel = new JLabel();
averageChargeLabel = new JLabel();

calculateButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
calculateCharges();
}
});

inputPanel.add(new JLabel("Group Name:"));
inputPanel.add(groupNameField);
inputPanel.add(new JLabel("Minutes Used:"));
inputPanel.add(minutesUsedField);

summaryPanel.add(new JLabel("Current Charge:"));
summaryPanel.add(currentChargeLabel);
summaryPanel.add(new JLabel("Total Charges:"));
summaryPanel.add(totalChargesLabel);
summaryPanel.add(new JLabel("Number of Groups:"));
summaryPanel.add(numberOfGroupsLabel);
summaryPanel.add(new JLabel("Average Charge:"));
summaryPanel.add(averageChargeLabel);

mainPanel.add(inputPanel, BorderLayout.NORTH);
mainPanel.add(calculateButton, BorderLayout.CENTER);
mainPanel.add(summaryPanel, BorderLayout.SOUTH);

getContentPane().add(mainPanel);
pack();
setVisible(true);
}

private void calculateCharges() {
String groupName = groupNameField.getText();
int minutesUsed = Integer.parseInt(minutesUsedField.getText());

double currentCharge = minutesUsed * RENTAL_RATE_PER_MINUTE;

NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();
currentChargeLabel.setText(currencyFormat.format(currentCharge));

totalCharges += currentCharge;
totalChargesLabel.setText(currencyFormat.format(totalCharges));

numberOfGroups++;
numberOfGroupsLabel.setText(Integer.toString(numberOfGroups));

averageChargeLabel.setText(currencyFormat.format(totalCharges / numberOfGroups));
}

public static void main(String[] args) {
new RecordingStudioProject();
}
}

To create a program that calculates the charges for groups using a local recording studio, we can use a form with labeled text boxes for input, a label for displaying the current group's charges, and a frame for the summary information.

Here's an example of how you can create this project using Python:

```python
import tkinter as tk
from tkinter import messagebox

RENTAL_RATE_PER_MINUTE = 200 / 60 # Calculate the rental rate per minute based on the hourly rate

total_charges = 0
num_groups = 0

def calculate_charges():
global total_charges, num_groups
name = name_entry.get()
minutes_used = int(minutes_entry.get())

charges = minutes_used * RENTAL_RATE_PER_MINUTE
total_charges += charges
num_groups += 1

charges_label.config(text="Charges: " + format_currency(charges))
total_charges_label.config(text="Total Charges: " + format_currency(total_charges))
num_groups_label.config(text="Number of Groups: " + str(num_groups))
average_charge_label.config(text="Average Charge per Group: " + format_currency(total_charges/num_groups))

messagebox.showinfo("Charges", "Charges calculated for group: " + name)

def format_currency(amount):
return "$" + "{:.2f}".format(amount)

# Create the main window
window = tk.Tk()
window.title("Recording Studio Charges")

# Create the form elements
name_label = tk.Label(window, text="Group Name:")
name_label.pack()
name_entry = tk.Entry(window)
name_entry.pack()

minutes_label = tk.Label(window, text="Minutes Used:")
minutes_label.pack()
minutes_entry = tk.Entry(window)
minutes_entry.pack()

calculate_button = tk.Button(window, text="Calculate Charges", command=calculate_charges)
calculate_button.pack()

charges_label = tk.Label(window, text="Charges: ")
charges_label.pack()

# Create the summary frame and labels
summary_frame = tk.LabelFrame(window, text="Summary Information")
summary_frame.pack(pady=10)

total_charges_label = tk.Label(summary_frame, text="Total Charges: ")
total_charges_label.pack()

num_groups_label = tk.Label(summary_frame, text="Number of Groups: ")
num_groups_label.pack()

average_charge_label = tk.Label(summary_frame, text="Average Charge per Group: ")
average_charge_label.pack()

# Start the main event loop
window.mainloop()
```

This program uses the `tkinter` module to create a graphical user interface (GUI) with the required form elements. It also includes functions to handle the calculation of charges, update the summary information, and format the currency display.

The `calculate_charges` function retrieves the group name and number of minutes used from the input fields, calculates the charges based on the rental rate per minute, updates the total charges and number of groups, and updates the labels in the summary frame.

The `format_currency` function formats the charges and other monetary values in the currency format.

When you run the program, a window will appear with the form elements and the summary frame. You can enter the group name and minutes used for each group, and click the "Calculate Charges" button to calculate the charges and update the summary information. A message box will also appear to show the charges calculated for each group.

Remember to copy and run this code in a Python environment that supports the `tkinter` module, such as IDLE or PythonTutor.