The C++ program to show and complete the Car class (in files Car.h and Car.cpp) with member functions to set and get the purchase price of a car is:
Car.h#ifndef CARH
#define CARH
class Car{
private:
int modelYear;
int purchasePrice;
int currentValue;
public:
void SetModelYear(int userYear);
int GetModelYear() const;
void SetPurchasePrice(int purchasePrice);
int GetPurchasePrice() const;
void CalcCurrentValue(int currentYear);
void PrintInfo();
};
#endif // CARH
Car.cpp#include<iostream>
#include<math.h>
#include "Car.h"
using namespace std;
void Car::SetModelYear(int userYear){
modelYear=userYear;
}
int Car::GetModelYear() const{
return modelYear;
}
void Car::SetPurchasePrice(int userPrice){
purchasePrice = userPrice;
}
int Car::GetPurchasePrice() const{
return purchasePrice;
}
void Car::CalcCurrentValue(int currentYear){
double depreciationRate = 0.15;
int carAge = currentYear- modelYear;
currentValue = (int)round(purchasePrice*pow((1-depreciationRate),carAge));
}
void Car::PrintInfo(){
cout<<"Car's information:\n";
cout<<"\t\tModel Year : "<<GetModelYear();
cout<<"\n\t\tPurchase price: "<<GetPurchasePrice();
cout<<"\n\t\tCurrentValue: "<<currentValue;
}
Read more about C++ programs here:
https://brainly.com/question/20339175
#SPJ1
Hannah is editing her brother’s birthday video. She has selected the usable shots and copied them onto her computer. What is the next step for Hannah? A. capture the shots B. create a rough cut C. create the final music D. add titles and credits
Answer:
She needs to create the final music
Answer:
She needs to create the final music
Explanation:
How can a company that collects and uses private customer data ensure it will move forward in a sustainable culture of privacy?
Select an answer:
1- by creating a culture of privacy in every facet of the company's operations
2- by developing an internal data privacy policy that can apply to all current and new products
3- by asking the hard questions, and struggling to get the right answers
4- by making sure the privacy policies provided to customers are up-to-date
The company that collects and uses private customer data will need to ensure that it will move forward in a sustainable culture of privacy if they act by:
Option 1: creating a culture of privacy in every facet of the company's operations.Option 4- by making sure the privacy policies provided to customers are up-to-date.What is Data Protection and Privacy?The terms data protection and data privacy is known to be one that is said to be used a lot and also interchangeably.
Note that Data privacy is one that tells about who has the ability or permission to access to data, and data protection is one that gives tools and policies to be able to restrict access to the data.
Hence, The company that collects and uses private customer data will need to ensure that it will move forward in a sustainable culture of privacy if they act by:
Option 1: creating a culture of privacy in every facet of the company's operations.Option 4- by making sure the privacy policies provided to customers are up-to-date.Learn more about privacy policies from
https://brainly.com/question/13335106
#SPJ1
You are in process of writing a class definition for the class Book. It has three data attributes:
book_title, book_author, and book_publisher. The data attributes should be private.
In Python, write an initializer method that will be part of your class definition. The attributes will
be initialized with parameters that are passed to the method from the main program.
Note: You do not need to write the entire class definition, only the initializer method
Using the knowledge in computational language in python it is possible to write a code that uses process of writing a class definition for the class Book.
Writting the code in python:class Book:
# a constructor for this class.
# The constructor should accept an argument for each of the fields.
def __init__(self, book_title, book_author, book_publisher):
self.book_title = book_title
self.book_author = book_author
self.book_publisher = book_publisher
def main():
b = Book("title1", "author1", "publisher1")
print(b.book_title)
print(b.book_author)
print(b.book_publisher)
main()
See more about python at brainly.com/question/18502436
#SPJ1
Why are there so few steps to secure
default IIS in Windows Server 2019?
The few steps to secure default IIS in Windows Server 2019 are:
Select the run window and type “inetmgr” After that press enter to open IIS web server in the windows system. Go to Default Document Option.Then select your site. Provide Default Page Name. Set Top in Priority Order.What is the Web Server (IIS) role in Windows Server 2019 ?Web Server (IIS) which is in the Windows Server 2019 helps to give secure as well as easy-to-manage, modular and extensible platform .
This platform gives a reliably hosting websites and services, and applications.
It should be noted that Microsoft Internet Information Server (IIS) has been adopted globally and is been used especially in the enterprise, even though it posses less-than-stellar reputation for security.
However, there has been great improvement in the Microsoft's web server solution over the years.
Learn more about Windows Server on:
https://brainly.com/question/12510017
#SPJ1
pleaseeeee helpppppppp
Answer:
int
Explanation:
a (signed) int has a higher rank than a char, therefore the result will be int, and an implicit type promotion will take place.
Mention and discuss specific professional ethics related to augmented reality, artificial intelligence, and the internet of things?
Specific professional ethics related to augmented reality, artificial intelligence, and the internet of things are:
OpacityBiasEmploymentPrivacySingularityAutonomous systemsWhat are the professional ethics of AI systems?Artificial intelligence often has some dilemma that confronts people who are in this field of duty. Some of the daily challenges that they must face are the ones mentioned above. Opacity is a challenge that even the end-users must face. Often, there is the challenge of not knowing how the program came about.
There is a worry about end-users participating in the process of developing some of these systems. People want to be more involved but since machine learning is not easy, many might not know how the results are generated.
Bias is another problem that augmented reality and the other mentioned fields face. Since the output is predictive in nature, there is often the worry that the machine might generate data that impede human freedom.
Learn more about the professional ethics of AI systems here:
https://brainly.com/question/28158916
#SPJ1
How has 5G become more energy efficient?
1. by creating cross channel wavelengths
2. by utilizing beamforming and multiple-input multiple-output (MIMO)
3. by converting to all solar power
4. by utilizing more energy efficient access points
Option 4. The way that 5G is more efficient is that is is able to utilize more energy efficient access points.
What is the 5G?
This is the term that is used to refer to the fifth generation mobile network. This is the latest generation of networks and it is known to be a faster way and a more efficient way of connecting to the internet when we compare it to the others that came before it.
This is known to have lower latency when we compare it to the 4G network. It is 100 times said to be faster than the 4G and more efficient for businesses and the people that use them. Hence the The way that 5G is more efficient is that is is able to utilize more energy efficient access points.
Read more on 5G network here: https://brainly.com/question/24664177
#SPJ1
convert the following decimaal numbers to octal numbers
1. 500
2. 169
3. 53
4.426
1. 500--->764
2. 169--->251
3. 53--->65
4.426--->652
In what way, if any, is the impact of a given risk affected by the timing of a project?
The impact of a given risk is greater in the middle of a project.
The impact of a given risk is not affected by the timing of a project.
The impact of a given risk is greater in the beginning of a project.
The impact of a given risk is greater toward the end of a project.
The impact of a given risk affected by the timing of a project is that The impact of a given risk is greater in the beginning of a project.
What is perfect timing?This is known to be the time when something happens at what we call the exact right or ideal time.
Time is known to be a key or one of the factors that is said to often makes projects what they stand to be.
Note that; projects are said to be often bounded by scope, time, cost, quality and others.
Hence, The impact of a given risk affected by the timing of a project is that The impact of a given risk is greater in the beginning of a project.
Learn more about timing from
https://brainly.com/question/2854969
#SPJ1
Answer: The likelihood of risk is greater in the beginning of a project.
Explanation: I got it right on edge
Project 12-2: Bird Counter
Help me make a Python program for birdwatchers that stores a list of birds along with a count of the
number of times each bird has been spotted.
Console
Bird Counter program
Enter 'x' to exit
Enter name of bird: red-tailed hawk
Enter name of bird: killdeer
Enter name of bird: snowy plover
Enter name of bird: western gull
Enter name of bird: killdeer
Enter name of bird: western gull
Enter name of bird: x
Name Count
=============== ===============
Killdeer 2
Red-Tailed Hawk 1
Snowy Plover 1
Western Gull 2
Specifications
Use a dictionary to store the list of sighted birds and the count of the number of times
each bird was sighted.
Use the pickle module to read the dictionary from a file when the program starts and
to write the dictionary to a file when the program ends. That way, the data that's
entered by the user isn't lost.
The program based on the information given is illustrated below.
How to illustrate the program?It should be noted that a computer program is a set of instructions in a programming language for the computer to execute.
Based on the information, the program is illustrated thus:
Code:
import pickle
#function to read birds data
def readBirdsData():
try:
birdsFile = open("birdsData","rb")
birdWatcher = pickle.load(birdsFile)
birdsFile.close()
birdWatcher ={}
except EOFError:
birdWatcher ={}
return birdWatcher
#function to write the data into file using pickle
def writeBirdsData(birdWatcher):
if birdWatcher == {} :
return
sorted(birdWatcher)
birdsFile = open("birdsData","ab")
pickle.dump(birdWatcher,birdsFile)
birdsFile.close()
#function to display birds data in sorted order
def displayBirdsData(birdWatcher):
print("Name\t\tCount")
print("========\t===========")
for key in sorted(birdWatcher.keys()):
print("{}\t\t{}".format(key,birdWatcher[key]))
#main function
def main():
birdWatcher = readBirdsData()
print("Bird Counter Program")
print ("\nEnter 'x' to exit\n")
name = input("Enter name of bird: ")
while True:
#break the loop if x is entered
if name == 'x':
#if the name exists in dictionary then increase the value
if the name in birdWatcher.keys():
birdWatcher[name] = birdWatcher[name] + 1
else:
#dd it otherwise
birdWatcher[name] = 1
name = input("Enter name of bird: ")
displayBirdsData(birdWatcher)
writeBirdsData(birdWatcher)
#driver code
if __nam__ == '__main__':
main()
Learn more about programs on:
https://brainly.com/question/26642771
#SPJ1
o How basic blocks are identified and how the blocks are used to construct control flow graphs
Basic blocks are identified because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.
Note that Basic Block is said to be a composition of statements that is known to be one that often always executes one after other, and this is often done in a sequence.
How do you create a flow graph from the basic blocks?Flow graph is gotten by:
Lets Block B1 be the initial node and also Block B2 will tend to follows B1, so from B2 to B1 there is seen a kind of an edge.Note that the first task is for a person to partition a sequence of three-address code and this is done into basic blocks.
Hence, Basic blocks are identified because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.
Learn more about basic blocks from
https://brainly.com/question/132319
#SPJ1
• Ethernet network that connects a single client PC to a single server and label the locations of switches and transmission links.
Provide a rationale for each part of your design, explaining the problem, approach, and why you made the choices you made.
In the network constructed, we need to use 3 switches to be able to connect a single client PC to the single server. Therefore:
Connect server to switch 1 (225 m)Connect switch 1 to switch 2 (225 m)Connect switch 2 to switch 3 (225 m)Connect switch 3 to client PC (225 m)What is the network about?The maximum distance for ethernet connection is known to be about 100 meters and it is one that is often used in the transmission speeds.
Note that when one has added to the network switches, the distance need to be increased to about 200 meters and thus about 900 meters of distance need to exist between the client PC and the server.
The Ethernet network need to be designed as:
Connect server to switch 1 (225 m)
Connect switch 1 to switch 2 (225 m)
Connect switch 2 to switch 3 (225 m)
Connect switch 3 to client PC (225 m)
Note that Total distance covered = 225 + 225 + 225 + 225
= 900 meters
Therefore, In the network constructed, we need to use 3 switches to be able to connect a single client PC to the single server.
Learn more about Ethernet from
https://brainly.com/question/16947988
#SPJ1
Following Aristotle,man by nature is a political animal,justify the above claim in the light of the Russian invasion of Ukraine
Following Aristotle, man by nature is a political animal using the claim in the light of the Russian invasion of Ukraine is that:
Aristotle stated that State is natural due to the fact that nature has not made man to be in a self-sufficient state. But Man has a lot of -different type of needs which they want them to be fulfilled. Russian need and Ukraine need differs and as such, man is fighting to satisfy their needs.What is the quote about?In his Politics, Aristotle was known to be a man who believed man to be a "political animal" due to the fact that he is a social creature that is said to have the power of speech and also one that has moral reasoning:
He sate that man is a lover of war and as such, Aristotle stated that State is natural due to the fact that nature has not made man to be in a self-sufficient state. But Man has a lot of -different type of needs which they want them to be fulfilled. Russian need and Ukraine need differs and as such, man is fighting to satisfy their needs.
Learn more about Aristotle from
https://brainly.com/question/24994054
#SPJ1
Input a list of employee names and salaries and store them in parallel arrays. End the input with a sentinel value. The salaries should be floating point numbers Salaries should be input in even hundreds. For example, a salary of 36,510 should be input as 36.5 and a salary of 69,030 should be entered as 69.0. Find the average of all the salaries of the employees. Then find the names and salaries of any employee who's salary is within 5,000 of the average. So if the average is 30,000 and an employee earns 33,000, his/her name would be found. Display the following using proper labels. Save your file using the naming format LASTNAME_FIRSTNAME_M08 FE. Turn in your file by clicking on the Start Here button in the upper right corner of your screen. 1.Display the names and salaries of all the employees. 2. Display the average of all the salaries 3. Display all employees that are within 5,000 range of the average.
Using the knowledge in computational language in JAVA it is possible to write the code being Input a list of employee names and salaries and store them in parallel arrays
Writting the code in JAVA:
BEGIN
DECLARE
employeeNames[100] As String
employeeSalaries[100] as float
name as String
salary, totalSalary as float
averageSalary as float
count as integer
x as integer
rangeMin, rangeMax as float
INITIALIZE
count = 0;
totalSalary =0
DISPLAY “Enter employee name. (Enter * to quit.)”
READ name
//Read Employee data
WHILE name != “*” AND count < 100
employeeNames [count] = name
DISPLAY“Enter salary for “ + name + “.”
READ salary
employeeSalaries[count] = salary
totalSalary = totalSalary + salary
count = count + 1
DISPLAY “Enter employee name. (Enter * to quit.)”
READ name
END WHILE
//Calculate average salary with mix , max range
averageSalary = totalSalary / count
rangeMin = averageSalary - 5
rangeMax = averageSalary + 5
DISPLAY “The following employees have a salary within $5,000 of the mean salary of “ + averageSalary + “.”
For (x = 0; x < count; x++)
IF (employeeSalaries[x] >= rangeMin OR employeeSalaries[x] <= rangeMax )
DISPLAY employeeNames[x] + “\t” + employeeSalaries[x]
END IF
END FOR
END
See more about JAVA at brainly.com/question/12978370
#SPJ1
What relation between two sets S and T must hold so that |S ∪ T| = |S| + |T|
Suppose S and T are sets. Then the intersection of S and T, denoted S∩T, is the set whose elements are only those that are elements of S and of T.
What is |S ∪ T| = |S| + |T|?DeMorgan’s Set Theory Laws
In Set Theory, there are analogous relationships called DeMorgan’s Set
Theory Laws. These laws are exactly the analogues of the corresponding logic
laws, where is replace by the complement, ∧ is replace by ∩, and ∨ is replaced
by ∪. DeMorgan’s Set Theory Laws are stated below:
S ∩ T = S ∪ T and S ∪ T = S ∩ T .
We will prove the latter of these below.
Theorem. Let S and T be sets. Then,
S ∪ T = S ∩ T .
two sets S and T must hold so that |S ∪ T| = |S| + |T|
To learn more about DeMorgan’s Set, refer
https://brainly.com/question/21353067
#SPJ9
Line formatting can be accomplished by using
Answer:
How can line formatting be accomplished?
To format line spacing:
Select the text you want to format. Selecting text to format.
On the Home tab, click the Line and Paragraph Spacing command. A drop-down menu will appear.
Move the mouse over the various options. A live preview of the line spacing will appear in the document. Select the line spacing you want to use.
The line spacing will change in the document.
Which microsoft tool can be used to review a systems security configuration recommended?
Answer:The Security Compliance Toolkit (SCT)
Explanation:
It allows security administrators to download, analyze, test, edit, and store Microsoft-recommended security configuration baselines for Windows and other Microsoft products.