Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also, write a program that creates three instances of the class. One instance should hold your information, and the other two should hold your friends’ or family members’ information. my information: name= doe address= 51 any street age= 19 number= 732 810 9995   friends info: name= ella address= 174 any street age= 22 number= 732 895 3586   friends info: name= meg address= 34 any street age= 20 number= 732 337 5580

Question

Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also, write a program that creates three instances of the class. One instance should hold your information, and the other two should hold your friends’ or family members’ information.

my information:

name= doe

address= 51 any street

age= 19

number= 732 810 9995

 

friends info:

name= ella

address= 174 any street

age= 22

number= 732 895 3586

 

friends info:

name= meg

address= 34 any street

age= 20

number= 732 337 5580

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Python

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Consider the functional dependency of relation R (A, B, C,D) F = {A→BC, B→C, A→B, AB→D} Compute clos...

A: Closure Set of F+ is: A→A, A→B,A→C, B→B, B→C,C→C, D→D, AB→A, AB→B, AB→C, AC→A, AC→B, AC→C, AD→A,AD→B...

Q: Evaluate the following statement: DOM is a limited interface which works only on JavaScript and HTML...

A: he HTML DOM model is constructed as a tree of Objects: The HTML DOM Tree of Objects With the obje...

Q: b) Machine cycle defines a loop process with four major components. Explain why machine cycle is imp...

A: Machine cycle has 4 phases: Fetch -  Decode - Execute -  Store   

Q: Identify the contents of the registers, memory location (C070H), and the flags as the following inst...

A: Given: M=C070 H Now solve the problem: LXI H, 2020H : (load register pair immediately) After executi...

Q: Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount ...

A: To create a table in SQL, create table command is used. Ans 1. The required query is: CREATE TABLE U...

Q: This is the question -  Write an application in which you declare an array of eight first names. Wri...

A: GIVEN: Create a Java program and declare an array of eight first names. Write a try block. Get the i...

Q: Compare between Relational database and NoSQL database.

A: Relational database and NoSQL database NoSQL database is a better option for modern applications. I...

Q: Describe the TCP congestion control Mechanism , explain it.

A: TCP Congestion Control is meant for handling Congestion in Network. TCP Congestion Control Policy co...

Q: Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Re...

A: The, given information is:  A file that contains a list of at least 15 six-digit account numbers. Re...

Q: // SuperMarket.cpp - This program creates a report that lists weekly hours worked  // by employees o...

A: #include <vector> #include <iostream> #include <string> struct Day {     std::stri...

Q: Amarillo Video Store is planning a promotional give-away for its long-standing customers. If the cus...

A: Decision Tree: It is a tree structure of various conditions that are considered to make a decision. ...

Q: Allow a user to enter any number of double values up to 15. The user should enter 99999 to quit ente...

A: import java.util.*;import java.lang.*; public class DistanceFromAverage {    public static void main...

Q: (b)/Éxplain Dijkstra Algorithm and compute the shortest paths of given Network fig-1. 2 Source Desbn...

A: Introduction of Dijkstra's Algorithm: The Dijkstra's Algorithm is used to find the minimum distance ...

Q: code is to be written in C A palindrome is a word that reads the same forward and backwards. For exa...

A: Introduction of the Program: The C program creates char type arrays that stores string and the progr...

Q: JAVA

A: As per our policy, we can answer only one question per question and kindly resubmit the remaining qu...

Q: a) Printers today have many features that include improved quality, photo printing capabilities, dig...

A: Some of the most important feature that are needed for a printer is that The printer must have a hi...

Q: (a) display_2D1list(list2D) that takes a 2D-list as input and prints all elements of that list in th...

A:   a.) Python program is   #function to display the list def display_2Dlist (list2D):       #when lis...

Q: please provide some explanations to help me understand the topic.

A: Based on our rule, when multiple questions are posted, we should answer only the first one. Please r...

Q: please help

A: Python Code for i in range(1,101): if i%2==0: print(i," is EVEN") else: print(i," is ODD")

Q: Let L = {0" : n > 1 and n mod 3 + 0}. Give the transition diagram of a Standard Turing Machine for L...

A: Solution is in Step 2.

Q: Code in c++ using switch/case statements, Im not looking for help using the website..

A: Actually, c++ is a powerful general purpose language.

Q: Binary Search algorithm has an element given in sequential arrays. We have seen that at the O (logN)...

A: Objective of the question:- To write the pseudo-code of the binary search algorithm if there are mul...

Q: Write a program for 8085 microprocessor the following function. F = X2 – 2X+5. Where X £ 5.

A: 25 - 10 +5 20Ans

Q: Computer Science Question

A: The given password:  R@pt0r As per text: for first character: 4 bits of entropy for next characters:...

Q: (g) get_total_crimes_by_type(adict, 2Dlist) takes a dictionary (crime_dict) and a 2D-list (database)...

A: def get_total_crimes_by_type(adict, 2Dlist):    total_crime = {}    for i in adict:        value = a...

Q: A Customer wants to order some products from any super shop through online.Super shop authority main...

A: The, given information is A Customer wants to order some products from any super shop through online...

Q: Write a program in C write a program that reads a series of strings and prints only those beginning ...

A: The required C Program is: #include<stdio.h>#define MAX 100#define SIZE 50int main(){ char Str...

Q: Program In C  Create one function that contains only one for loop to print the passed array of point...

A: #include <stdio.h> //Function declaration void print(char **arrVal, int size); int main() {   ...

Q: Computer Science Question

A: Click to see the answer

Q: Question 6: Write a Java program that displays the GUI shown on the right, as precisely as possible,...

A: The main objective of the java program GUI.java is to create a frame with the buttons as shown in th...

Q: Only C/C++

A: #include <iostream>using namespace std;// This functions returns the// Maximum no of students ...

Q: Your program should read the specifications of graphic objects from a text File provided by the user...

A: Actually, java is a object oriented programming language. It is a platform independent.

Q: What is a view? How do you define a view? Does the data described in a view definition ever exist in...

A: What is a View? Actually, a view is a SQL statement that is stored with a given view name in the da...

Q: 3.Write a generic class called GenericStack<T> that represents a stack structure. A stack stru...

A: //Note: Since two questions are different i prefered to answer the first question please resubmit th...

Q: Suppose your one-button such that 'B’ or 'b’ of your keyboard is does not work correctly. If you typ...

A: import java.util.Scanner;//importing scanner class public class Main{ public static void main(String...

Q: Complete the following applied optimization word problem. Include a well-labeled figure, clearly def...

A: Actually, the given information is: To mail a package with the United States Postal service without ...

Q: Write a c++ program to calculate the answer of a quadratic equation. Take necessary inputs from the ...

A: Program approach: The quadratic equation is is given by Ax2 + Bx + C = 0  Read in the input values ...