1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Evgesh-ka [11]
2 years ago
13

Such a class might store information about the account balance, the name of the account holder, and an account number. What inst

ance variables would you declare to hold this information? Give a type and name for each.
Computers and Technology
1 answer:
nadya68 [22]2 years ago
4 0

Answer:

an instance variable is a variable that is within a class but it is outside of constructors, methods or blocks.

the instance variables for the class bankAccount can be accountNumber, account holder name and balance.

below are the types and names declared to hold the information.

private string accountHolderName;

private int accountNumber;

private double balance;

note:

accountHolderName is a string data type because names are in alphabets.

accountNumber is an integer since they are in numbers.

balance is a double data type because it is a floating point number.

You might be interested in
You are in the windows power shell window and decide to encrypt folder which of the following command do you use
aleksklad [387]

Answer:

try this script bro

(Get-ChildItem –Path C:\Folder).Encrypt()

Explanation:

simply microsoft just use encrypt() & decrypt() words in script to act doing the method encrypting & decrypting.

but i suggest you to use the windows gui features , its more easier. just right click on your folder target , go to properties then click advanced button , checklist encrypt box.

7 0
2 years ago
C++
daser333 [38]

#include<iostream>

#include <fstream>

#include <vector>

#include <string>

#include "StatePair.h"

using namespace std;

int main() {

ifstream inFS;

int zip;

int population;

string abbrev;

string state;

unsigned int i;

vector<StatePair <int, string>> zipCodeState;

vector<StatePair<string, string>> abbrevState;

vector<StatePair<string, int>> statePopulation;

inFS.open("zip_code_state.txt");

if (!inFS.is_open()) {

    cout << "Could not open file zip_code_state.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <int, string> temp;

    inFS >> zip;

    if (!inFS.fail()) {

        temp.SetKey(zip);

    }

    inFS >> abbrev;

    if (!inFS.fail()) {

        temp.SetValue(abbrev);

    }

    zipCodeState.push_back(temp);

}

inFS.close();

inFS.open("abbreviation_state.txt");

if (!inFS.is_open()) {

    cout << "Could not open file abbreviation_state.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <string, string> temp;

    inFS >> abbrev;

    if (!inFS.fail()) {

        temp.SetKey(abbrev);

    }

    getline(inFS, state);

    getline(inFS, state);

    state = state.substr(0, state.size()-1);

    if (!inFS.fail()) {

        temp.SetValue(state);

    }

    abbrevState.push_back(temp);

}

inFS.close();

inFS.open("state_population.txt");

if (!inFS.is_open()) {

    cout << "Could not open file state_population.txt." << endl;

    return 1;

}

while (!inFS.eof()) {

    StatePair <string, int> temp;

    getline(inFS, state);

    state = state.substr(0, state.size()-1);

    if (!inFS.fail()) {

        temp.SetKey(state);

    }

    inFS >> population;

    if (!inFS.fail()) {

        temp.SetValue(population);

    }

    getline(inFS, state);

    statePopulation.push_back(temp);

}

inFS.close();

cin >> zip;

for (i = 0; i < zipCodeState.size(); ++i) {

 }

for (i = 0; i < abbrevState.size(); ++i) {

 }

for (i = 0; i < statePopulation.size(); ++i) {

}

}

Statepair.h

#ifndef STATEPAIR

#define STATEPAIR

#include <iostream>

using namespace std;

template<typename T1, typename T2>

class StatePair {

private:

T1 key;

T2 value;

public:

StatePair()

{}

void SetKey(T1 key)

{

this->key = key;

}

void SetValue(T2 value)

{

this->value = value;

}

T1 GetKey() { return key;}

T2 GetValue() { return value;}

void PrintInfo()

{

cout<<key<<" : "<<value<<endl;

}

};

3 0
1 year ago
Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
MrMuchimi

In python 3.8:

user_input = input().split()

x = user_input[0]

char = user_input[-1]

for w in range(1,int(x)+1):

   if char in user_input[w]:

       print(user_input[w])

I hope this helps

7 0
3 years ago
Heeeeeeelp :)<br><br> hwjkwdlfo;pk
Rasek [7]

Answer: C u use schoology too :D

Explanation:

7 0
2 years ago
write a c++ program that takes a string input from the user and removes all characters except numerals also display the number o
Xelga [282]

Answer:

hi

Explanation:

5 0
3 years ago
Other questions:
  • Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
    10·2 answers
  • The ____ is a new feature in versions of microsoft office, starting with office 2007; it consists of tabs, which contain groups
    5·1 answer
  • According to Mintzberg's classification of managerial roles, the role of a(n) ______ is to transmit information received from ou
    7·1 answer
  • You listened to a song on your computer. Did you use hardware or software? Explain.
    11·2 answers
  • Plagiarism occurs when writers
    14·2 answers
  • (Game Design) A float is a blank space, used as a placeholder in an array<br><br> True or false
    13·1 answer
  • What is a set of best practices that helps an organization to maximize the benefits of an information system, while at the same
    5·1 answer
  • Consider our authentication protocol 4.0, in which Alice authenticates herself to Bob, which we saw works well (i.e., we found n
    15·1 answer
  • Identify the true statements about the approach to privacy around the world. a. Uncertainty concerning the nature, extent, and v
    11·1 answer
  • Jobs that use math and science to solve problems involving the design and development of technologies can be found in the what c
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!