#include <iostream>
using namespace std;
class CameraPhone:Phone{
int imageSize,memorySize;
public:
CameraPhone(int image_size,int memory_size):imageSize(image_size),memorySize(memory_size){}
int numPictures(){
return memorySize-imageSize;
}
}
int main(){}
Here is the code for the derived class, CameraPhone:
class Phone:
def __init__(self, brand, model, price): self.brand = brand self.model = model self.price = priceclass CameraPhone(Phone):
def __init__(self, brand, model, price, imageSize, memorySize): super().__init__(brand, model, price) self.imageSize = imageSize self.memorySize = memorySizedef numPictures(self):
return self.memorySize // self.imageSizeWhat are the derived class?This code defines a derived class, CameraPhone, that inherits from the Phone class. The CameraPhone class has two additional data members: imageSize and memorySize. The constructor for the CameraPhone class takes two additional parameters corresponding to these data members. The numPictures() function returns the number of pictures that the camera's memory can hold.
Here is an example of how to use the CameraPhone class:
phone = CameraPhone("Apple", "iPhone 13 Pro", 1000, 10, 100)
print(phone.numPictures())
# Output: 10
This code will print the number of pictures that the camera's memory can hold, which is 10 in this case.
Find out more on derived class here: https://brainly.com/question/31942927
#SPJ2
is badlion safe and how ?
Answer:
Yes, badlion is safe. The further explanation is given below.
Explanation:
Badlion Client does not encompass any malicious programs, like viruses and sometimes malware.Badlion application is pretty much safe to be used on inequality in society because most expressly forbidden plugins like decided to post as well as schematics become unavailable on the client-side whenever you enter Hypixel, but that is not a confirmation and therefore should not be depended towards.
#Below is a class representing a person. You'll see the
#Person class has three instance variables: name, age,
#and GTID. The constructor currently sets these values
#via a calls to the setters.
#
#Create a new function called same_person. same_person
#should take two instances of Person as arguments, and
#returns True if they are the same Person, False otherwise.
#Two instances of Person are considered to be the same if
#and only if they have the same GTID. It does not matter
#if their names or ages differ as long as they have the
#same GTID.
#
#You should not need to modify the Person class.
class Person:
def __init__(self, name, age, GTID):
self.set_name(name)
self.set_age(age)
self.set_GTID(GTID)
def set_name(self, name):
self.name = name
def set_age(self, age):
self.age = age
def set_GTID(self, GTID):
self.GTID = GTID
def get_name(self):
return self.name
def get_age(self):
return self.age
def get_GTID(self):
return self.GTID
#Add your code below!
#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, then False.
person1 = Person("David Joyner", 30, 901234567)
person2 = Person("D. Joyner", 29, 901234567)
person3 = Person("David Joyner", 30, 903987654)
print(same_person(person1, person2))
print(same_person(person1, person3))
Answer:
Here is the function same_person that takes two instances of Person as arguments i.e. p1 and p2 and returns True if they are the same Person, False otherwise.
def same_person(p1, p2): #definition of function same_person that takes two parameters p1 and p2
if p1.GTID==p2.GTID: # if the two instances of Person have same GTID
return True #returns true if above condition evaluates to true
else: #if the two instances of Person do not have same GTID
return False #returns false when two persons have different GTID
Explanation:
person1 = Person("David Joyner", 30, 901234567) #first instance of Person
person2 = Person("D. Joyner", 29, 901234567) #second instance of Person
person3 = Person("David Joyner", 30, 903987654) #third instance of Person
print(same_person(person1, person2)) #calls same_person method by passing person1 and person2 instance of Person to check if they are same
print(same_person(person1, person3)) #calls same_person method by passing person1 and person3 instance of Person to check if they are same
The function works as follows:
For function call print(same_person(person1, person2))
The GTID of person1 is 901234567 and that of person2 is 901234567
If condition if p1.GTID==p2.GTID in the function same_person checks if the GTID of person1 is equal to the GTID of person2. This condition evaluates to true because GTID of person1 = 901234567 and GTID of person2 = 901234567
So the output is:
True
For function call print(same_person(person1, person3))
The GTID of person1 is 901234567 and that of person3 is 903987654
If condition if p1.GTID==p2.GTID in the function same_person checks if the GTID of person1 is equal to the GTID of person3. This condition evaluates to false because GTID of person1 = 901234567 and GTID of person2 = 903987654 and they are not equal
So the output is:
False
The complete program along with its output is attached in a screenshot.
industrial advantages of using a waterfall model for library system
Answer:
It allows for departmentalization and managerial control. Simple and easy to understand and use. Easy to manage due to the rigidity of the model – each phase has specific deliverables and a review process. Phases are processed and completed one at a time.
Explanation:
Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a space. Ex: If origList = {40, 50, 60, 70} and offsetAmount = {5, 7, 3, 0}, print:45 57 63 70 #include using namespace std;int main() {const int NUM_VALS = 4;int origList[NUM_VALS];int offsetAmount[NUM_VALS];int i = 0;origList[0] = 40;origList[1] = 50;origList[2] = 60;origList[3] = 70;offsetAmount[0] = 5;offsetAmount[1] = 7;offsetAmount[2] = 3;offsetAmount[3] = 0;// your solution goes here
Answer:
Complete the program with the following code segment
for(int i =0;i<=3;i++)
{
cout<<offsetAmount[i]+origList[i]<<" ";
}
return 0;
}
Explanation:
The following line is an iteration of variable i from 1 to 3; It iterates through elements of origList and offsetAmount
for(int i =0;i<=3;i++){
This adds and prints the corresponding elements of origList and offsetAmount
cout<<offsetAmount[i]+origList[i]<<" ";
} The iteration ends here
If you implement too many security controls, what portion of the CIA triad (Information Assurance Pyramid) may suffer?
a. Availability
b. Confidentiality
c. Integrity
d. All of the above
Answer:
Option A
Availability
Explanation:
The implementation of too many security protocols will lead to a reduction of the ease at which a piece of information is accessible. Accessing the piece of information will become hard even for legitimate users.
The security protocols used should not be few, however, they should be just adequate to maintain the necessary level of confidentiality and integrity that the piece of information should have, While ensuring that the legitimate users can still access it without much difficulty.
Write down the complete AJAX code to avoid page caching.
Answer:
AZAX is key sentence for without reloading page.
Explanation:
AJAX is also known as XHR. If some one wants to send the file without reloading then look ahead at the search function and prompt the users by auto saving the documents. This request is sent to the server. The server return the data to your network. Whenever you have seen the file form, some action on the page. You will see some request from AJAX server request on your functional area. AJAX is called a reloading file without page. AZAX is stands for Asynchronous java scripts And XML. AJAX is used to send an email. AZAX is not used in front end, it is used from back end process.
Objects for AJAXJava ScriptWord Press Action.ProtectionError handling processDevelop a simple game that teaches kindergartners how to add single-digit numbers. Your function game() will take an integer n as input and then ask n single-digit addition questions. The numbers to be added should be chosen randomly from the range [0, 9] (i.e.,0 to 9 inclusive). The user will enter the answer when prompted. Your function should print 'Correct' for correct answers and 'Incorrect' for incorrect answers. After n questions, your function should print the number of correct answers.
Answer:
2 correct answer out of 3
You resurrected an old worksheet. It appears to contain most of the information that you need, but not all of it. Which step should you take next
Answer:
The answer is "check the worksheet is not read only"
Explanation:
The read only mode is used for read the file data, and it doesn't allows the user to update the file, and for updating the worksheet we should check iut does not open in the read-only mode.
If it is open, then we close it and for close we goto the office button and click on the tools option after that goto general setting, in this there is a check box for turn off the read-only mode.
Under the ____________________, federal agencies must 1) review their IT systems for privacy risks, 2) post privacy policies on their Web sites, 3) post machine-readable privacy policies on their Web sites, and 4) report privacy activities.
Answer:
E-Government Act of 2002.
Explanation:
The E-Government Act of 2002 is a statute of the United States of America which was enacted by the 107th U.S Congress on the 17th of December, 2002. The E-Government Act of 2002 was signed into law to facilitate the management and promotion of the US government processes and services, as well as enhance transparency and accountability between the government and the public through the application of internet-based information technology.
Under the E-Government Act of 2002, federal agencies must;
1. Review their IT systems for privacy risks.
2. Post privacy policies on their websites.
3. Post machine-readable privacy policies on their websites.
4. Report privacy activities.
Write a for loop to print all NUM_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp = {90, 92, 94, 95}, print:
90, 92, 94, 95
Note that the last element is not followed by a comma, space, or newline.
#include
using namespace std;
int main() {
const int NUM_VALS = 4;
int hourlyTemp[NUM_VALS];
int i = 0;
hourlyTemp[0] = 90;
hourlyTemp[1] = 92;
hourlyTemp[2] = 94;
hourlyTemp[3] = 95;
/* Your solution goes here */
cout << endl;
return 0;
}
Answer:
string sep = "";
for (i = 0; i < NUM_VALS; i++) {
cout << sep << hourlyTemp[i];
sep = ", ";
}
Explanation:
Insert the snippet at the commented location.
With the absence of a join() method as found in other languages, it is always a hassle to suppress that separator comma from appearing at the beginning or the end of your output. This solution is nice since it doesn't require any magic flags to keep track of wether the first element was printed.
Operations that a given computing agent can perform are called
Answer:
Primitive operation
Explanation:
Operations that a given computing agent can perform are called primitive operations.
These operations are basic arithmetic work done by an algorithm such as assigning a variable, calling a method, returning an array, etc. They are sometimes written in pseudo-code.
Explain how Deep Packet Inspection works (DPI). How is this technology beneficial to Perimeter Security? Lastly, describe a scenario where the use of DPI may be considered a privacy concern.
Answer:
Answered below
Explanation:
Deep packet inspection is a kind of data processing that thoroughly inspects data sent over a computer network and acts on it by rerouting, logging or blocking it. Uses of DPI include;
To ensure that data is in the correct format, internet censorship, to check for malicious code, and also eavesdropping.
DPI uses port mirroring and optical splitter to acquire packets for inspection. It combines the functionality of an intrusion detection system and intrusion prevention system with a traditional stateful firewall.
DPI is therefore helpful in perimeter security by keeping unauthorized users out and at the same time protecting authorized users from attack. Privacy concerns have been raised over the inspection of content layers of internet protocols such as in the case of censorship and government regulations and control.
Can Anyone put my name in binary code using these images? Bentley is my name
Answer:
10010100001001010100101101010100000000000000000010100101010101111010001001010010100101001
Explanation:
Give five types of hardware resource and five types of data or software resource that can usefully be shared. Give examples of their sharing as it occurs in practice in distributed systems.
Answer:
Answered below
Explanation:
Hardware resources that can be usefully shared and also examples of their sharing include;
A) CPU servers, which carry out computations for clients.
B) Network capacity transmission of data or packet transmission is done using the same circuit, meaning many communication channels share the same circuit.
C) Screen networks windows systems which enable processes in remote computers to update the contents of their local server.
D) Memory cache server.
E) Disk file server, virtual disk server.
Softwares include;
A) Web-page web servers which allow client programs to have read-only access to page contents.
B) Database whose contents can be usefully shared.
C) File servers enable multiple users access to files .
D) Objects can be shared in distributed systems example shared ticket booking, whiteboard etc.
E) Exclusive lock which enables the coordination of accessing a special resource.
Which branch structure does a program use to output "Yes" if a variable's value is positive, or "No" otherwise?
Answer:
Selection control structure
Explanation:
This is often referred to as if-conditional statement;
This condition tests for a condition and performs a sequence of operation depending on the result of the condition;
Take for instance, the following program written in python
x = int(input("enter any number: "))
if x < 0:
print("Yes")
else
print("No")
The above checks if the input number is less than 0,
If the condition is true, it prints Yes
If otherwise, it prints No
By using ____, you can use reasonable, easy-to-remember names for methods and concentrate on their purpose rather than on memorizing different method names.
Answer:
Polymorphism
Explanation:
If we use polymorphism so we can apply the names that could be easy to remember for the methods' purpose.
The information regarding the polymorphism is as follows:
The person has various attributes at the same timeFor example, a man could be a father, a husband, an entrepreneur at the same time.In this, the similar person has different types of behavior in different situations.Therefore we can conclude that If we use polymorphism so we can apply the names that could be easy to remember for the methods' purpose.
Learn more about the behavior here: brainly.com/question/9152289
Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How many foreign keys are defined in the AP database?
Answer:
SELECT COUNT (DISTICT constraint_name)
FROM apd_schema.constraint_column_usage
RUN
Explanation:
General syntax to return a catalog view of information about foreign keys.
SELECT DISTINCT PARENT_TABLE =
RIGHT(Replace(DC.constraint_name, 'fkeys_', ''),
Len(Replace(DC.constraint_name, 'fkeys_', '')) - Charindex('_', Replace(DC.constraint_name, 'fkeys_', ''))),
CHILD_TABLE = DC.table_name,
CCU.column_name,
DC.constraint_name,
DC.constraint_type
FROM apd_schema.table_constraints DC
INNER JOIN apd_schema.constraint_column_usage CCU
ON DC.constraint_name = CCU.constraint_name
WHERE DC.constraint_type LIKE '%foreign'
OR DC.constraint_type LIKE '%foreign%'
OR DC.constraint_type LIKE 'foreign%'
RUN
Consider a bit stuffing framing method where the start of a frame is indicated by 6 consecutive ones, followed by 2 zeroes. What should be the bit stuffing rules at the transmitter? What should be the bit destuffing rules at the receiver? Fill in the blank to show what is the stream after bit stuffingWrite the rule for stuffing:Write the rule for destuffing:Assume the user data stream before bit stuffing is 011111100011111101. What is the stream after bit stuffing?
Answer:
Explanation:
Bit stuffing Framing Method
In the given situation, the beginning casing is shown by 6 sequential ones followed by 2 zeroes.
The beginning casings are generally known as the flags.which are utilized for demonstrating the beginning and end of the edges. Essentially utilized for the synchronization between the sender and the reciever.
Along these lines here the beginning and end banners are 11111100(this is on the grounds that the end banner is same as the beginning banner).
To enable us understand how this question plays out, let us understand the rule for Stuffing and De-stuffing .
The standard for stuffing is :
At whatever point there are 5 successive ones supplement one zero in the casing which is an information. The embedded zero piece is known as the stuffed bit.The principle reason behind stuffing somewhat after 5 back to back ones is to evade the distortion of information (data) as flag. If the reciever misconstrues the information as end banner then he would quit recieving the information where the entire information sent by the sender will be left and lost causing an error-prone information.
The rule for destuffing :
The standard/rule for destuffing is only inverse as stuffing. After recieving the bitstuffed information (data), at the reciever's end zero after each 5 continuous ones will be evacuated and the rest of the information will be considered as the genuine information.
In the given situation, the beginning casing is demonstrated by 6 back to back ones followed by 2 zeroes.
the beginning casings are normally known as the flags.which are utilized for showing the beginning and end of the edges. Essentially utilized for the synchronization between the sender and the receiver.
In this way here the beginning and end banners are 11111100(this is on the grounds that the end banner is same as the beginning banner).
data before bit stuffing is: 011111100011111101the stream after stuffing would be: 01111101000111101101where the bolded/underlined digits represents the stuffed bits
cheers i hope this helps
Using virtualization comes with many advantages, one of them being performance. Which of these is NOT another realistic advantage of using virtualization over dedicated hardware?a. There are improvements in security and high availability during outage.b. There are cost benefits.c. Maintenance and updates are simplified or eliminated.d. There are fewer points of failure.
Answer:
a. There are improvements in security and high availability during outage
Explanation:
Virtualization occurs when data that could be in several formats (for example, storage devices) are made to appear real through a software. There are virtualization providers who act as third-party between users and the original manufacturers of the software. While virtualization has received wide popularity in recent times because of the several advantages it offers of which cost-saving is included, it also has some disadvantages. One of them from the options provided is the possibility of a security breach and its uncertain availability.
The security breach arises because of the proliferation of information on the virtual space. This information can be accessed by unauthorized hackers. Also since third-party providers are the usual providers of virtualization services, the availability depends on them because if they shut down, users can no longer access the software.
What is the output of the following Python program? try: fin = open('answer.txt') fin.write('Yes') except: print('No') print('Maybe')
(<ANSWER RETRACTED>)
Consider two different processors P1 and P2 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 3 GHz clock rate and a CPI of 1.0. Which processor has the highest performance expressed in instructions per second
Answer:
Processor P2 has the highest performance expressed in instructions per second.
Explanation:
Given:
Processors:
P1
P2
Clock rate of P1 = 3 GHz
Clock rate of P2 = 3 GHz
Cycles per instruction = CPI of P1 = 1.5
Cycles per instruction = CPI of P2 = 1.0
To find:
which processor has the highest performance in instructions per second (IPS)
Solution:
Compute CPU time:
CPU time = (Number of instructions * cycles per instruction) / clock rate
CPU time = (I * CPI) / R
We are given the CPI and clock rate. So
CPU time = (I * CPI) / R
I / CPU time = R/CPI
Since
Instructions per second = Number of instructions (I) / execution time
IPS = I / CPU time
So
Instructions Per Second = clock rate / cycles per instruction
IPS = R/CPI
Putting the values in above formula:
Instructions Per Second for P1 = IPS (P1)
= clock rate P1 / CPI (P1)
= 3 GHz / 1.5
IPS (P1) = 2
As 1 GHz = 10⁹ Hz
IPS (P1) = 2x10⁹
Instructions Per Second for P2 = IPS (P2)
= clock rate P2 / CPI (P2)
= 3 / 1.0
IPS (P2) = 3
As 1 GHz = 10⁹ Hz
IPS (P2) = 3x10⁹
Hence processor P2 has the highest performance expressed in instructions per second i.e. 3x10⁹
what makes''emerging technologies'' happen and what impact will they have on individuals,society,and environment
Answer:
Are characterized by radical novelty
Explanation:
Example, intelligent enterprises are reimaging and reinventing the way they do bussines
what are the 21St century competencies or skills required in the information society?
Answer:
Communication
Collaboration
ICT literacy
Explanation:
These are some of the skills that are needed in the 21st century to compete and thrive in the information society.
To remain progressive, one needs to have good communication skills. These communication skills can include Active Listening and Passive Listening.
Collaboration is important because you'll have to work with other people as no man is an island, we need someone else so the skill of collaboration is necessary to compete and stay relevant in the information society in the 21st century.
IT literacy is also very important because one needs to have basic computer knowledge such as programming, computer essentials and applications, etc.
A user in an apartment building on a wireless network is no longer able to print to the network printer. The user has been able to print to the printer in the past and nothing on the network has changed. A technician notices that the user has a different IP address scheme than what was originally setup and is able to browse the Internet using that IP address scheme. What should he do?
Answer:
The technician should either provide a route from the user's IP scheme to the printer or change the user's IP scheme to be within the same scheme as the printer.
Explanation:
The most likely reason the user is unable to print to the printer is that the user's computer cannot path the current address to the address of the printer. Without the printer being on the same subnet as the user's computer, the computer has no way of being able to tell where the printer is.
The two solutions to this are to either add a route to the user's computer explicitly telling the user's computer where to trace to find the printer or to change the user's computer to match the IP scheme of the printer.
Cheers.
Children walking on the sidewalk, a person sitting in a parked car, and a parking lot with vehicles
entering and exiting indicate a
A. construction zone.
B. railroad crossing.
C. school zone.
D. none of the above
Answer:
Explanation:
Hello friend !!!!!!!!!!!!
The answer is school zone
Hope this helps
plz mark as brainliest!!!!!!!
Children walking on the sidewalk, a person sitting in a parked car, and a parking lot with vehicles entering and exiting indicate a school zone (Option C).
A school zone is a specific urban area where can be found a school and/or is near a school. A school zone shows an accessible parking area for the use of individuals (e.g. parents) holding valid accessible parking passes.Moreover, a school zone sign refers to a warning signal because children cannot be as alert as adults when they cross a road.In conclusion, children walking on the sidewalk, a person sitting in a parked car, and a parking lot with vehicles entering and exiting indicate a school zone (Option C).
Learn more in:
https://brainly.com/question/8019372
If the data rate is 10 Mbps and the token is 64 bytes long (the 10-Mbps Ethernet minimum packet size), what is the average wait to receive the token on an idle network with 40 stations? (The average number of stations the token must pass through is 40/2 = 20.) Ignore the propagation delay and the gap Ethernet requires between packets.
Answer:
1.024x10^-5
Explanation:
To calculate the transmission delay bytes for the token,
we have the token to be = 64bytes and 10mbps rate.
The transmission delay = 64bytes/10mbps
= 51.2 microseconds
A microsecond is a millionth of a second.
= 5.12 x 10^-5
The question says the average number of stations that the token will pass through is 20. Remember this value is gotten from 40/2
20 x 5.12 x 10^-5
= 0.001024
= 1.024x10^-5
Therefore on an idle network with 40 stations, the average wait is
= 1.024x10^-5
How does the teacher know you have completed your assignment in Google Classroom?
Answer:
When students have completed the assignment, they simply click the Mark As Done button to let the teacher know they have finished.
Explanation: Note: The teacher does NOT receive an alert or email notification when work has been turned in, or marked as done.
What is the science and art of making an illustrated map or chart. GIS allows users to interpret, analyze, and visualize data in different ways that reveal patterns and trends in the form of reports, charts, and maps? a. Automatic vehicle locationb. Geographic information systemc. Cartographyd. Edge matching
Answer:
c. Cartography.
Explanation:
Cartography is the science and art of making an illustrated map or chart. Geographic information system (GIS) allows users to interpret, analyze, and visualize data in different ways that reveal patterns and trends in the form of reports, charts, and maps.
Basically, cartography is the science and art of depicting a geographical area graphically, mostly on flat surfaces or media like maps or charts. It is an ancient art that was peculiar to the fishing and hunting geographical regions. Geographic information system is an improved and technological form of cartography used for performing a whole lot of activities or functions on data generated from different locations of the Earth.
Answer:
C. Cartography
Explanation:
I have an PC and it has one HMDI port but I need two monitors other problem is I need one monitor to connect to my USB drive work system and one to stay on my regular windows system how can I do this?
Answer:
You'll need dual monitor cables and an adapter.
Explanation:
First Step
Position your monitors on your desk or workspace. Make sure the systems are off.
Second Step
Make sure your power strip is close by. Then plug your power strip and connect the first monitor to your PC via your HDMI
Use an adapter to do the same for the second monitor.
Turn the entire system on
Third Step
On your PC, right click on a blank place in your home screen and click on Display Settings.
If you want to have two separate displays showing the same thing, select Duplicate, but if you want to have the two displays independent of each other, select Extend Display.
Apply the settings and select Done.
You bought a monochrome laser printer two years ago. The printer has gradually stopped feeding paper. Which printer component should you check first
Answer:
Pick up roller
Explanation:
you should first check the pickup roller component. This component is the part of the printer that picks paper up from the paper tray. The pickup roller links the printer and the paper. When the printer printer is running, the roller would take paper from the paper tray for the printer to print on. One of the issues it can have is Paper jam where the roller would stop turning so that it will no longer be picking papers up from the tray.