Czy można wywołać metodę z głównego, jeśli jest prywatna? Jeśli nie, jak to możliwe?

Próbuję uruchomić ten program, ale obecnie otrzymuję błędy. Nie wiem, jak to zrobić. Jeśli zmienię klasę Rachunków Oszczędnościowych na publiczne, powinna być w porządku, ale muszę ją zachować tak, jak jest.

Problem jest w głównej funkcji.

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

class SavingsAccount
{
    int accountType;
    string ownerName;
    long ssn;
    double accountClosurePenaltyPercent, accountBalance;
    void Information();
    inline double AccountClosureLoss()
    {
        return (accountBalance * accountClosurePenaltyPercent);
    }
    void OutputInformation();

};

void SavingsAccount::Information()
{
    cout << "Enter Account Type (1 for Checking or 2 for Savings): ";
    cin >> accountType;
    cout << "Enter owner name: ";
    getline(cin, ownerName);
    cout << "Enter the Social Security Number: ";
    cin >> ssn;
    cout << "Enter the percent penalty for closing account(decimal form): ";
    cin >> accountClosurePenaltyPercent;
    cout << "Enter the account balance: ";
    cin >> accountBalance;
}

void SavingsAccount::OutputInformation()
{
    cout << "Account Type: " << endl;
    cout << "Name: " << ownerName << endl;
    cout << "SSN: " << ssn << endl;
    cout << "Account Closure Penaly %: " << accountClosurePenaltyPercent << endl;
    cout << "Account Balance: " << accountBalance;
}

int main(void)
{
    SavingsAccount.Information(); 
    SavingsAccount.AccountClosureLoss();
    SavingsAccount.OutputInformation();
    return 0;
}

Co próbowałem do tej pory.

int main(void)
    {
        SavingsAccount John;
        John.Information(); 
        John.AccountClosureLoss();
        John.OutputInformation();
        return 0;
    }

Jakieś sugestie?

questionAnswers(4)

yourAnswerToTheQuestion