Answer:
short_names = ["Gus", "Bob", "Ann"]
print(short_names[0])
print(short_names[1])
print(short_names[2])
Explanation:
There are some typos in your code. In addition to the missing part of the code, I corrected the typos.
First of all, initialize the list called short_names. The list starts with "[" and ends with "]". Between those, there are must be the names (Since each name is a string, they must be written between "" and there must be a semicolon between each name)
Then, you can print each name by writing the name of the list and the index of the names between brackets (Index implies the position of the element and it starts with 0)
Answer:
#include <iostream>
using namespace std;
class BankAccount {
string name = name;
double balance = balance;
BankAccount( string name, double balance ) {
string name = name;
double balance = balance;
return 0;
}
string getName( ){
return name;
}
double getbalance( ) {
return balance;
void setName( string username){
name = username;
}
void setbalance( double newBalance){
balance = newBalance;
}
int main( ) {
BankAccount user1(John, 0.0);
BankAccount user2(Jane, 0.0);
user1.setbalance( 2300.00)
user2.setbalance( 4300.00)
cout << user1.getname() << user1.getbalance();
cout << user1.getname() << user1.getbalance();
}
Explanation:
The C source code above using a class to create a data structure of a bank account user name and balance. The attribute name and balance are private to the class and can be retrieved and modified through the get and set methods.
The task where the Layout view most helpful is showing how a report will look when printed.
<h3>What is the Layout view?</h3>
The Layout view is known to be a view that is said to be more of visually-oriented when compared to the Design view.
Note that the Layout view is one where each control often shows real data and as such, The task where the Layout view most helpful is showing how a report will look when printed.
Learn more about Layout view from
brainly.com/question/1327497
#SPJ1
A method is written with the header 'num' yourMethod(string name, num code). The method's type is <u>'num'.</u>
In the context of programming. a header refers to supplemental data placed at the beginning of a block of data being transmitted or stored. In the context of the Java method, the header is where you tell the Java program what value type if any, the method will return (a string value, an int value, a double value, etc). As well as the return type, you require a name for your method, which is also placed in the header. You can pass values over to your methods in between a pair of round brackets.
You can learn more about method in Java at
brainly.com/question/28489761
#SPJ4