Which of the following statements is not correct about inner class
Q: Assume function call below will replace the comment in the main(). What should be the actual…
A: Typdef is a keyword in programming language that provides meaningful names to already esisting…
Q: Which of the following is True about the following code
A: The correct answer is option 2: removing the PTR operator will cause an error because PTR is used to…
Q: Give an example in which passing an argument by reference would be useful.
A: Suppose we want to change the content of array elements. That is multiply each element by 2. Now a…
Q: Which of the following statements is correct? Circle c;Circle c();
A: Given: Which of the following statements is correct? Circle c;Circle c();
Q: Which operators cannot be overloaded? (c++)
A: In C++ we can overload some operators +, -, [ ], -> et.c but some operators can not be…
Q: Write the form of the following argument. Is the argument valid or invalid? Justify your answer.…
A: The Answer is
Q: Which of the following statements is true? The CPU is used to perform the actual processing of data.
A: I have given an answer in step 2.
Q: A function with parameters cannot be decorated. State whether true or false. a. False b. True
A: We need to tell that a function with parameters cannot be decorated. This is true or false?
Q: 14. Which of the following is called extraction/get from operator? a) > c) > d) <
A: The following operators are defined as follows: << : It is also known as insertion operator…
Q: Read the following program and Identify the assignment operator used in the program int _tmain(int…
A: Option (a)is the correct option
Q: Rewrite the following line of code so that it is correct if (name = "Bao")
A: The question asks to correct the statement syntactically.
Q: 4. Which of the statements is equivalent to a. int [] myArr b. int [] myArr (1, 2, 3, 4); c. int []…
A: Given myArr is an integer array of size 4 Iterate through the loop from i=0 to i=3 and set…
Q: Consider the following statements: i- 42; int p; After these statements, which of the following…
A: Here k is storing address of i with the statement k=&i With the statement p=k, p is storing…
Q: What is the output of the following int main()
A: Q
Q: 10. Local variables are known only in the function in which they are defined Local variables are…
A: Function is the set of instruction or code to perform a particular operation. This function can be…
Q: Reorganize the following code using functions. print("Happy birthday to you") print("Happy birthday…
A: Question:
Q: int main() { E(); C(); E(); } void B() {...} void C() {..} void D() {..} void E() { B(); D(); } A…
A: Solution
Q: A function is defined as 'void TEST(int x, float y, char z)'. What datatype does it return? Select…
A: The problem is based on the baiscs of functions in programming languages.
Q: 2. Which of the following is TRUE about the given function prototype? int sum(int x, int y) Which of…
A: Function prototype is the function declaration which is used to define the function with its name,…
Q: Swap two numbers using functions.(no return value, with arguments passed)
A: Given: Swap two numbers using functions. (no return value, with arguments passed)
Q: Question 4 Rewrite the following statement without using variables. Then, give an exam- ple that…
A: Solution - For the above question 4 and 5 we have to rewrite their statements without using…
Q: Which of the following is the negation of the statement “If you eat dinner at night, then you should…
A: Negation of if A then B and C :- if A then not B or C
Q: Given variable name: catch is this valid or invalid? A) valid B) invalid Question 23 These are a…
A: Q: Answer given multiple choice questions
Q: 5 what are if and else clauses in python 6 differnt types of function in python 7 write any…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: Given the following program fill in the blanks resulting from the cout statements: int c1 = 3; int…
A: I have given C code to find the value of c1,c2,c3 and *p1,*p2,*p3.
Q: Which of the following statements is true? In Python we do not specify variable types, it is…
A: Variables are just memory areas set aside for storing values. This means that when you create a…
Q: retermine if the following argument
A: 1. p ~p r ~r r=>~p p=>~r 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 0…
Q: Question 9 Electrical resistors are said to be connected "in series" if the same current passes…
A: Note :- You have not mention the language of program, so i'm answering your question in C++. Your…
Q: The operator that returns the remainder of a division between A and B A/B A/=B A%B A |= B
A: correct answer is A%B
Q: Your program should be able to handle both cases for each state, fo example, "CA" or "ca" for…
A: westernMarried,easternMarried,southernMarried=0,0,0;westernSingle,easternSingle,southernSingle=0,0,0…
Q: How can functions reduce the amount of written code and make code easier to read/follow? Provide a…
A: A function is basically a "chunk" of code that you may reuse rather than writing it out repeatedly.…
Q: Which function calls would provide the most helpful test of this function?
A: The function find the minimum value of the two given values (num1 and num2) and the conditions given…
Q: Which of the following lines of code returns an error?
A: Given:
Q: Write a code to overload area() function that can find the area of circle, rectangle , triangle and…
A: Given: Write a code to overload area() function that can find the area of circle, rectangle ,…
Q: is thrown if the new operator is unable to allocate the amount of memory requested by the caller
A: The Answer:
Q: int main() { E(); C(); E(); } void B() {...} void C() {...} void D() {...} void E() { B(); D(); }…
A: The functions are called or executed in the same sequence as they appear in the program. Whenever, a…
Q: Which of the following statements is true about the use of functions in Python? OA function can be…
A: A function consists of a set of statements and is used to perform a specific task. A function is…
Q: Which of the following statements is true about the following block of code?
A: So the problem is bit a pseudo code we can read the code and based on the logic give the answer.
Q: Which operators cannot be overloaded?
A: Operator Overloading is a process of overloading an operator such that it can perform some new…
Q: of the following is not required to be a first class object? a) ability to be a return value of a…
A: Explanation Typically, first-class objects can be stored in a variable, passed as arguments to…
Q: Which of the following is not true at the end of the program?
A: Given: MCQ of python classes is given, after completing the program what will be the correct option…
Q: Write a code fragment to prompt the user to enter the age of the visitor for the concert with the…
A: The solution is provided below.
Q: All functions A.) return true or false B.) receive a parameter C.) must be named differently…
A: Lets analyze each options: All functions A)return true or false functions can return int, float,…
Q: 9. Is the expression "sue" != "fred" True or False
A: Given statement: "sue" != "fred" We have to check whether this statement is true or false.
Q: Which of the following statements is true concerning the improper error handling?
A: The statement which is true concerning the improper error handling are:-
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Create a class Client_Information, inherited from the class personType with an additional data member to store Emirates ID, Age, date of birth. (Use the class dateType to store the date of birth. Add appropriate constructors and methods to initialize, access, and manipulate the data members. Write a main function to test the classes, Make a record of 10 customer’s accounts using Arrays. in C++Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 500 entries. Define a class addressType that can store a street address, city, state, and ZIP code. Use the appropriate functions to print and store the address. Also, use constructors to automatically initialize the member variables. Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in this chapters Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables. Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process a maximum of 500 entries. The program should perform the following operations: Load the data into the address book from a disk. Sort the address book by last name. Search for a person by last name. Print the address, phone number, and date of birth (if it exists) of a given person. Print the names of the people whose birthdays are in a given month. Print the names of all the people between two last names. Depending on the users request, print the names of all family members, friends, or business associates.Ans8 izt--7 Write the following Book class:A Book has-a title, ISBN number, author and price.o Include the following:o All instance fields (variables)o Two Constructors: a default constructor and onerequiring all fields as parameterso Methods – an accessor and mutator for each instancefieldso Create two Book objects with title, isbn, author andpriceo Print the information about the bookso Change the price of both books.o Reprint the information about the books.
- Please help with this problem ASAP! Create a class definition named Substance that can set and read the Substance’s name andmass (in kilograms) and compare 2 Substance objects with the less_than function. Create aclass definition named Fluid that inherits Substance and can set and get the Fluid’s viscosity(how thick it is) from 0.0 to 1.0. Then create an Ink class definition and implementationwhich inherits Fluid and can set and get the Ink’s color (red 00-FF, green 00-FF, blue 00-FF)as a HEX triplet string. A passed color should be validated; it must be 6 characters long andonly contain the “0123456789ABCDEF” characters.• Consider a class Shapethat containso A data member named as ShapeName of string typeo A data member named as areaof type into A member function displayarea()• Derive two classes named Circle and polygon from the class Shape that containo A parameterized constructor to initialize data members that they inherit from the class ShapeIn the main(), create instances of Shape Circle and Polygon classes. Invoke displayarea() with shape object while passing references of Circle and Polygon instances.2. Create a class home with following data members, area (int), and cost as protected data member. Create a class (with data members as city, state) derived from this bass class home. Enter the detail for 5 objects (derived) and search with state to display all the homes available.( Use only c++language)
- Create a class time24, each object is a value represented the time ofday in the form hours, minutes and seconds. Provide a constructorthat enables an object of this class to be initialized when it isinstantiated. The constructor should contain default values in case noinitializes are provided.Provide Public member functions for each of the followingoperations: set the time, print the time, increment the time by onesecond, compare two times for equality, increment the time by onehour, determine if one time is “less than” (comes before) anothertime, and final print the time in format 12 hours.Include any additional operations that you think would be useful foryour class.1. Which of these are ways you could refer to original and new class pairings? first class/second class parent/child base class/derived class superclass/subclass 2. We access both object and class attributes using dot notation True False 3. A function within a class definition is a(n) class function operation object function method 4. Objects have A value A type A reference count A unique ID 5. A class is a(n) _________ for an object Which of the following is not appropriate to fill in the blank? blueprint mold set of instructions accessor 6. A____could be thought of as a mold that creates objectsCreate a class home with following data members, area (int), and cost as protected data member. Create a class (with data members as city, state) derived from this bass class home.Enter the detail for 5 objects (derived) and search with state to display all the homes available. (write code in C++)
- nyoni.trinos87@gmail.com Question 1 Using C# create a class called shapes, the class is supposed to have attributes length, width and height. There should be methods for calculating the area and the perimeter of a shape. Create classes circle, rectangle and square to inherit from class shapes. The derived classes should override methods in the parent class for them to calculate their own areas and perimeters.Is there a different way of doing this problem? Question: Create a class AccessPoint with the following attributes: x - a double representing the x coordinate y - a double representing the y coordinate range - an integer representing the coverage radius status - On or Off Add constructors. The default constructor should create an access point object at position (0.0, 0.0), coverage radius 0, and Off. Add accessor and mutator functions: getX, getY, getRange, getStatus, setX, setY, setRange and setStatus. Also, add a set function that sets the location coordinates and the range. Add the following member functions: move and coverageArea. Add a function overlap that checks if two access points overlap their coverage and returns true if they overlap. Add a function signalStrength that returns the wireless signal strength as a percentage. The signal strength decreases as one moves away from the access point location. Test your class by writing a main function that creates five access…1) Create a class BankAccount with the attribute balance.2) Create a BankAccount print method that prints the balance.3) Create a class CheckingAccount which inherits from BankAccount.4) CheckingAccount has an attribute numChecks.5) In CheckingAccount override the BankAccount print method to also print numChecks.6) Instantiate two objects, one of type BankAccount and one of type CheckingAccount.7) Call the print functions for each object. (PYTHON)Example OutputBalance: 100000Balance: 200000 NumChecks: 10