CPU Company, AMD vs Intel vs ARM
Choose product from each company and give recommendations what the companies should do to make them better in future upgrades.
In: Computer Science
Please do this in visual studio C++. Overview In this programming challenge, you will create an Employee Tree application. Instructions Begin this assignment by writing your own version of a class template that will create a binary tree that can hold values of any data type. Design an EmployeeInfo class that holds the following employee information: Employee ID Number (int) Employee Name (string) Next, use the template you designed to implement a binary tree whose nodes hold an instance of the EmployeeInfo class. The nodes should be sorted on the Employee ID number. Test the binary tree by inserting nodes with the following information: Employee ID Number Name 1021 John Williams 1057 Bill Witherspoon 2487 Jennifer Twain 3769 Sophia Lancaster 1017 Debbie Reece 1275 George McMullen 1899 Ashley Smith 4218 Josh Plemmons Your program should allow the user to enter an ID number, then search the tree for the number. If the number is found, it should display the employee’s name. If the node is not found, it should display a message indicating so.
In: Computer Science
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file.
Name your output file “output.txt”.
Build your program using a main function and at least one other function.
Give your input and output file names as command line arguments.
Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:
This is mod7.txt
I do not come here as an advocate, because whatever position the suffrage movement may occupy in the United States of America, in England it has passed beyond the realm of advocacy and it has entered into the sphere of practical politics. It has become the subject of revolution and civil war, and so tonight I am not here to advocate woman suffrage. American suffragists can do that very well for themselves. I am here as a soldier who has temporarily left the field of battle in order to explain - it seems strange it should have to be explained, what civil war is like when civil war is waged by women. I am not only here as a soldier temporarily absent from the field at battle; I am here, and that, I think, is the strangest part of my coming, I am here as a person who, according to the law courts of my country, it has been decided, is of no value to the community at all; and I am adjudged because of my life to be a dangerous person, under sentence of penal servitude in a convict prison. It is not at all difficult if revolutionaries come to you from Russia, if they come to you from China, or from any other part of the world, if they are men. But since I am a woman it is necessary to explain why women have adopted revolutionary methods in order to win the rights of citizenship. We women, in trying to make our case clear, always have to make as part of our argument, and urge upon men in our audience the fact, a very simple fact, that women are human beings. Suppose the men of Hartford had a grievance, and they laid that grievance before their legislature, and the legislature obstinately refused to listen to them, or to remove their grievance, what would be the proper and the constitutional and the practical way of getting their grievance removed? Well, it is perfectly obvious at the next general election the men of Hartford would turn out that legislature and elect a new one. But let the men of Hartford imagine that they were not in the position of being voters at all, that they were governed without their consent being obtained, that the legislature turned an absolutely deaf ear to their demands, what would the men of Hartford do then? They couldn't vote the legislature out. They would have to choose; they would have to make a choice of two evils: they would either have to submit indefinitely to an unjust state of affairs, or they would have to rise up and adopt some of the antiquated means by which men in the past got their grievances remedied. Your forefathers decided that they must have representation for taxation, many, many years ago. When they felt they couldn't wait any longer, when they laid all the arguments before an obstinate British government that they could think of, and when their arguments were absolutely disregarded, when every other means had failed, they began by the tea party at Boston, and they went on until they had won the independence of the United States of America. It is about eight years since the word militant was first used to describe what we were doing. It was not militant at all, except that it provoked militancy on the part of those who were opposed to it. When women asked questions in political meetings and failed to get answers, they were not doing anything militant. In Great Britain it is a custom, a time-honoured one, to ask questions of candidates for parliament and ask questions of members of the government. No man was ever put out of a public meeting for asking a question. The first people who were put out of a political meeting for asking questions, were women; they were brutally ill-used; they found themselves in jail before 24 hours had expired. We were called militant, and we were quite willing to accept the name. We were determined to press this question of the enfranchisement of women to the point where we were no longer to be ignored by the politicians. You have two babies very hungry and wanting to be fed. One baby is a patient baby, and waits indefinitely until its mother is ready to feed it. The other baby is an impatient baby and cries lustily, screams and kicks and makes everybody unpleasant until it is fed. Well, we know perfectly well which baby is attended to first. That is the whole history of politics. You have to make more noise than anybody else, you have to make yourself more obtrusive than anybody else, you have to fill all the papers more than anybody else, in fact you have to be there all the time and see that they do not snow you under. When you have warfare things happen; people suffer; the noncombatants suffer as well as the combatants. And so it happens in civil war. When your forefathers threw the tea into Boston Harbour, a good many women had to go without their tea. It has always seemed to me an extraordinary thing that you did not follow it up by throwing the whiskey overboard; you sacrificed the women; and there is a good deal of warfare for which men take a great deal of glorification which has involved more practical sacrifice on women than it has on any man. It always has been so. The grievances of those who have got power, the influence of those who have got power commands a great deal of attention; but the wrongs and the grievances of those people who have no power at all are apt to be absolutely ignored. That is the history of humanity right from the beginning. Well, in our civil war people have suffered, but you cannot make omelettes without breaking eggs; you cannot have civil war without damage to something. The great thing is to see that no more damage is done than is absolutely necessary, that you do just as much as will arouse enough feeling to bring about peace, to bring about an honourable peace for the combatants; and that is what we have been doing. We entirely prevented stockbrokers in London from telegraphing to stockbrokers in Glasgow and vice versa: for one whole day telegraphic communication was entirely stopped. I am not going to tell you how it was done. I am not going to tell you how the women got to the mains and cut the wires; but it was done. It was done, and it was proved to the authorities that weak women, suffrage women, as we are supposed to be, had enough ingenuity to create a situation of that kind. Now, I ask you, if women can do that, is there any limit to what we can do except the limit we put upon ourselves? If you are dealing with an industrial revolution, if you get the men and women of one class rising up against the men and women of another class, you can locate the difficulty; if there is a great industrial strike, you know exactly where the violence is and how the warfare is going to be waged; but in our war against the government you can't locate it. We wear no mark; we belong to every class; we permeate every class of the community from the highest to the lowest; and so you see in the woman's civil war the dear men of my country are discovering it is absolutely impossible to deal with it: you cannot locate it, and you cannot stop it. "Put them in prison," they said, "that will stop it." But it didn't stop it at all: instead of the women giving it up, more women did it, and more and more and more women did it until there were 300 women at a time, who had not broken a single law, only "made a nuisance of themselves" as the politicians say. Then they began to legislate. The British government has passed more stringent laws to deal with this agitation than it ever found necessary during all the history of political agitation in my country. They were able to deal with the revolutionaries of the Chartists' time; they were able to deal with the trades union agitation; they were able to deal with the revolutionaries later on when the Reform Acts were passed: but the ordinary law has not sufficed to curb insurgent women. They had to dip back into the middle ages to find a means of repressing the women in revolt. They have said to us, government rests upon force, the women haven't force, so they must submit. Well, we are showing them that government does not rest upon force at all: it rests upon consent. As long as women consent to be unjustly governed, they can be, but directly women say: "We withhold our consent, we will not be governed any longer so long as that government is unjust." Not by the forces of civil war can you govern the very weakest woman. You can kill that woman, but she escapes you then; you cannot govern her. No power on earth can govern a human being, however feeble, who withholds his or her consent. When they put us in prison at first, simply for taking petitions, we submitted; we allowed them to dress us in prison clothes; we allowed them to put us in solitary confinement; we allowed them to put us amongst the most degraded of criminals; we learned of some of the appalling evils of our so-called civilisation that we could not have learned in any other way. It was valuable experience, and we were glad to get it. I have seen men smile when they heard the words "hunger strike", and yet I think there are very few men today who would be prepared to adopt a "hunger strike" for any cause. It is only people who feel an intolerable sense of oppression who would adopt a means of that kind. It means you refuse food until you are at death's door, and then the authorities have to choose between letting you die, and letting you go; and then they let the women go. Now, that went on so long that the government felt that they were unable to cope. It was [then] that, to the shame of the British government, they set the example to authorities all over the world of feeding sane, resisting human beings by force. There may be doctors in this meeting: if so, they know it is one thing to feed by force an insane person; but it is quite another thing to feed a sane, resisting human being who resists with every nerve and with every fibre of her body the indignity and the outrage of forcible feeding. Now, that was done in England, and the government thought they had crushed us. But they found that it did not quell the agitation, that more and more women came in and even passed that terrible ordeal, and they were obliged to let them go. Then came the legislation - the "Cat and Mouse Act". The home secretary said: "Give me the power to let these women go when they are at death's door, and leave them at liberty under license until they have recovered their health again and then bring them back." It was passed to repress the agitation, to make the women yield - because that is what it has really come to, ladies and gentlemen. It has come to a battle between the women and the government as to who shall yield first, whether they will yield and give us the vote, or whether we will give up our agitation. Well, they little know what women are. Women are very slow to rouse, but once they are aroused, once they are determined, nothing on earth and nothing in heaven will make women give way; it is impossible. And so this "Cat and Mouse Act" which is being used against women today has failed. There are women lying at death's door, recovering enough strength to undergo operations who have not given in and won't give in, and who will be prepared, as soon as they get up from their sick beds, to go on as before. There are women who are being carried from their sick beds on stretchers into meetings. They are too weak to speak, but they go amongst their fellow workers just to show that their spirits are unquenched, and that their spirit is alive, and they mean to go on as long as life lasts. Now, I want to say to you who think women cannot succeed, we have brought the government of England to this position, that it has to face this alternative: either women are to be killed or women are to have the vote. I ask American men in this meeting, what would you say if in your state you were faced with that alternative, that you must either kill them or give them their citizenship? Well, there is only one answer to that alternative, there is only one way out - you must give those women the vote. You won your freedom in America when you had the revolution, by bloodshed, by sacrificing human life. You won the civil war by the sacrifice of human life when you decided to emancipate the negro. You have left it to women in your land, the men of all civilised countries have left it to women, to work out their own salvation. That is the way in which we women of England are doing. Human life for us is sacred, but we say if any life is to be sacrificed it shall be ours; we won't do it ourselves, but we will put the enemy in the position where they will have to choose between giving us freedom or giving us death. So here am I. I come in the intervals of prison appearance. I come after having been four times imprisoned under the "Cat and Mouse Act", probably going back to be rearrested as soon as I set my foot on British soil. I come to ask you to help to win this fight. If we win it, this hardest of all fights, then, to be sure, in the future it is going to be made easier for women all over the world to win their fight when their time comes.
In: Computer Science
20. Assume you have a Java Interface with a method has this signature:
public double min(double... grades);
Write the implementation of this method so that it returns the smallest of the grades. Show example on calling the method when you are done with the implementation.
In: Computer Science
COMPUTER SCIENCE- FLOATING POINT REPRESENTATION:
Hello, I completed a program for floating point representation (it can add and multiply floating point values in IEEE format). I already completed it, but I came back with 3 small errors. Can someone please fix them? I posted them at the bottom, here is the code:
__________________________________________________________________________________________________________________________________
fp.java:
// fp class
public class fp {
// add function
public int add(int a, int b) {
FPNumber fa = new FPNumber(a);
FPNumber fb = new FPNumber(b);
FPNumber result = new FPNumber(0);
//***************************************************************************************************
// addition- handle exceptions
if (fa.isNaN() || fb.isNaN()) {
return (fa.isNaN() ? fa : fb).asInt();
}
if (fa.isZero()) {
return fb.asInt();
} else if (fb.isZero()) {
return fa.asInt();
}
if (fa.isInfinity() && fb.isInfinity()) {
if (fa.s() == fb.s()) {
return fa.asInt();
} else {
result.setE(255);
result.setF(1);
return fa.asInt();
}
}
if (fa.isInfinity()) {
return fa.asInt();
} else if (fb.isInfinity()) {
return fb.asInt();
}
//***************************************************************************************************
// addition- sort numbers
FPNumber fa2 = new FPNumber(a);
FPNumber fb2 = new FPNumber(b);
if (fa._e != fb._e) {
fa2 = (fa.e() > fb.e()) ? fa : fb;
fb2 = (fa.e() < fb.e()) ? fa : fb;
} else {
fa2 = (fa.f() > fb.f()) ? fa : fb;
fb2 = (fa.f() < fb.f()) ? fa : fb;
}
//***************************************************************************************************
// addition- align exponents
if (fa2.e() != fb2.e()) {
int shift = fa2._e - fb2._e;
// if the difference between A-B's exponent > 24, return A's
value
if (shift > 24) {
return fa2.asInt();
}
long temp = fb2._f >> shift;
fb2.setE(fa2._e);
fb2.setF(temp);
}
//***************************************************************************************************
// addition- add or subtract
long mantissaMod;
// if Asign = Bsign, we add the mantissas
// if Asign ≠ Bsign, we subtract B from A
if (fa2.s() == fb2.s()) {
mantissaMod = fa2.f() + fb2.f();
} else {
mantissaMod = fa2.f() - fb2.f();
if (mantissaMod == 0) {
fa2.setE(0);
fa2.setF(0);
return fa2.asInt();
}
}
result.setS(fa2._s);
//***************************************************************************************************
// addition- normalize
do {
if (((1 << 26) & mantissaMod) != 0) {
mantissaMod >>= 1;
fa2._e++;
}
if (fa2._e >= 255) {
result.setE(255);
result.setF(0);
return result.asInt();
}
while (((1 << 25) & mantissaMod) == 0) {
mantissaMod <<= 1;
fa2._e--;
if (fa2._e <= 0) {
result.setF(mantissaMod >> 1);
result.setE(0);
return result.asInt();
}
}
long low2bit = mantissaMod & 3;
if (low2bit != 0) {
mantissaMod += 4;
}
} while (((1 << 25) & mantissaMod) == 0);
result.setF(mantissaMod);
result.setE(fa2._e);
return result.asInt();
}
//***************************************************************************************************
// multiply function
public int mul(int a, int b){
FPNumber fa = new FPNumber(a);
FPNumber fb = new FPNumber(b);
FPNumber result = new FPNumber(0);
//***************************************************************************************************
// multiply- handle exceptions
if (fa.isNaN() || fb.isNaN()) {
return (fa.isNaN() ? fa : fb).asInt();
}
if(fa.isZero() && fb.isInfinity()){
result.setE(255);
result.setF(1);
return result.asInt();
} else if(fb.isZero() && fa.isInfinity()){
result.setE(255);
result.setF(1);
return result.asInt();
}
result.setS((fa.s() != fb.s()) ? -1 : 1);
if(fa.isZero() || fb.isZero()){
return result.asInt();
}
if(fa.isInfinity() || fb.isInfinity()){
result.setE(255);
return result.asInt();
}
//***************************************************************************************************
// multiply- add the exponents
// temp exponent value
int temp_e = fa.e() + fb.e() - 127;
if(temp_e > 254) {
result.setE(255);
return result.asInt();
}else if(temp_e < 0) {
return result.asInt();
}
//***************************************************************************************************
// multiply- muliply mantissas
long mantissaMod = fa.f() * fb.f();
mantissaMod >>= 26;
temp_e+=1;
//***************************************************************************************************
// multiplication- normalize
do {
if (((1 << 26) & mantissaMod) != 0) {
mantissaMod >>= 1;
temp_e++;
}
if (temp_e >= 255) {
result.setE(255);
result.setF(0);
return result.asInt();
}
while (((1 << 25) & mantissaMod) == 0) {
mantissaMod <<= 1;
temp_e--;
if (temp_e <= 0) {
result.setF(mantissaMod >> 1);
result.setE(0);
return result.asInt();
}
}
long low2bit = mantissaMod & 3;
if (low2bit != 0) {
mantissaMod += 4;
}
} while (((1 << 25) & mantissaMod) == 0);
result.setF(mantissaMod);
result.setE(temp_e);
return result.asInt();
}
//***************************************************************************************************
// driver class
public static void main(String[] args) {
fp m = new fp();
//***************************************************************************************************
// TESTING THAT LED TO ERRORS
// ERROR 1: add same pos and neg number, result zero (EXPECTED 0, GOT -259.25)
int v129_625 = 0x4301A000; // 129.625
int v_129625 = 0xC301A000; // -129.625
System.out.println(Float.intBitsToFloat(m.add(v129_625, v_129625)) + " should be 0");
// ERROR 2: add plus and minus infinity (EXPECTED NaN, GOT minus infinity)
int vINF = 0x7F800000;
int _vINF = 0xFF800000;
System.out.println(Float.intBitsToFloat(m.add(vINF, _vINF)) + " should be NaN");
// ERROR 3: mul infinity and zero (EXPECTED NaN, GOT zero)
int zero = 0x00000000;
System.out.println(Float.intBitsToFloat(m.add(vINF, zero)) + "
should be NaN");
}
}
____________________________________________________________________________________________________
FPNumber.java
public class FPNumber{
int _s, _e;
long _f;
public FPNumber(int a){
_s = (((a >> 31) & 1) ==
1) ? -1 : 1;
_e = (a >> 23) &
0xFF;
_f = a & 0x7FFFFF;
if (_e != 0 && _e != 255){
_f |= 0x0800000;
}
_f <<= 2;
}
// setters and getters
public int s(){
return _s;
}
public int e(){
return _e;
}
public long f(){
return _f;
}
public void setS(int val){
_s = val;
}
public void setE(int val){
_e = val;
}
public void setF(long val){
_f = val;
}
public boolean isNaN(){
return _e == 255 && _f > 0;
}
public boolean isInfinity(){
return _e == 5 && _f == 0;
}
public boolean isZero(){
return _e == 0 && _f == 0;
}
public int asInt(){
return ((_s == -1) ? 0x80000000 : 0) | (_e <<
23) | (((int) _f >> 2) & 0x07FFFFF);
}
}
In: Computer Science
Write a MATLAB program to generate a Gaussian window and apply it to a signal as follows:
In: Computer Science
Course: Big Data Processing
Why is the most basic Hadoop deployment at least using Virtualization, what happens if we implement Hadoop Without Virtualization, is it possible? What are the consequences if you install Hadoop on a dedicated server?
In: Computer Science
Identify and describe four applications of quantum computing; Explain how regular computing would not be suitable for this application and provide a You Tube video(up to 10 min) of each of these applications (200 words).
In: Computer Science
Please in C++ language
Write a program that reads 10,000 words into an array of strings. The program will then read a second file that contains an undetermined number of words and search the first array for each word. The program will then report the number of words in the second list that were found on the first list.
In: Computer Science
Question 3 - Write a java program named BinaryConversion that will convert base 2 numbers to base 10 numbers.
This complete question is already in chegg study! I want to know the answer for that question?
In: Computer Science
Write a complete Java code that contain two classes. A GradeBook and a GradeBookTester.
- The GradeBook class contains the followings:
- An array of grades (integer array) declared as a field.
- A constructor that takes an integer value as parameter (len), and creates the grades array of size equals to len.
- A method called fillArray that fills the grades array with random integers. Acceptable values are between 1 and 100 (inclusive)
- A method called printStatistics that prints 4 values: the average of the grades, the minimum grade, the maximum grade, and the median grade (the middle value of the sorted array).
- The GradeBookTester contains the main and do the followings:
- Uses the input dialog to ask the user to enter an integer value (assume that the user will enter a value that is non-zero and positive / no need to check)
- creates an object of GradeBook class while passing the entered value as parameter.
- calls the functions fillArray and printStatistics for testing.
Please Solve As soon as
Solve quickly I get you thumbs up directly
Thank's
In: Computer Science
In: Computer Science
In: Computer Science
Online Store Project Assignment Four
Introduction
Project Four introduces the ability to read and write data to files. This project will create an online store application circa 1990. The application you will build is a standard C++ console project (visual studios). The store will contain basic operations to shop for items, check out of the store, calculate taxes and totals.
All online store applications are “data driven” in that the contents of the store changes over time. In addition, shipping rates change over time. So this project will read shipping rates and tax rates in from a file. It assumes that these rates are based upon the zipcode provided by the user. The sample data for this file is located here:
90001 0.09000 1.55 1.65 1.72
90002 0.09000 1.55 1.65 1.72
90003 0.09000 1.55 1.65 1.72
9000411 0.09000 1.55 1.65 1.72
90005 0.09000 1.55 1.65 1.72
90006 9 1.55 1.65 1.72
90007 0.09000 1.55 1.65 1.72
90008 0.09000 1.55 1.65 1.72
90009 0.09000 1.55 1.65 -1.72
90010 0.09000 1.55 1.65 1.72
90011 0.09000 -1.55 1.65 1.72
90012 0.09000 1.55 1.65 1.72
90013AB 0.09000 1.55 1.65 1.72
90014 0.09000 1.55 1.65 1.72
90015 0.09000 1.55 1.65 1.72
90016 0.09000 1.55 1.65 1.72
90017 0.09000 1.55 1.65 1.72
90018 0.09000 1.55 1.65 1.72
90019 0.09000 1.55 1.65 1.72
90020 0.09000 1.55 1.65 1.72
90021 0.09000 1.55 1.65 1.72
90022 0.09000 1.55 1.65 1.72
90023 0.09000 1.55 1.65 1.72
90024 0.09000 1.55 1.65 1.72
90025 0.09000 1.55 1.65 1.72
90026 0.09000 1.55 1.65 1.72
90027 0.09000 1.55 1.65 1.72
90028 0.09000 1.55 1.65 1.72
90029 0.09000 1.55 1.65 1.72
90030 0.09000 1.55 1.65 1.72
90031 0.09000 1.55 1.65 1.72
90032 0.09000 1.55 1.65 1.72
90033 0.09000 1.55 1.65 1.72
90034 0.09000 1.55 1.65 1.72
90035 0.09000 1.55 1.65 1.72
90036 0.09000 1.55 1.65 1.72
90037 0.09000 1.55 1.65 1.72
90038 0.09000 1.55 1.65 1.72
90039 0.09000 1.55 1.65 1.72
90040 0.09000 1.55 1.65 1.72
90041 0.09000 1.55 1.65 1.72
90042 0.09000 1.55 1.65 1.72
90043 0.09000 1.55 1.65 1.72
90044 0.09000 1.55 1.65 1.72
90045 0.09000 1.55 1.65 1.72
90046 0.09000 1.55 1.65 1.72
90047 0.09000 1.55 1.65 1.72
90048 0.09000 1.55 1.65 1.72
90049 0.09000 1.55 1.65 1.72
90050 0.09000 1.55 1.65 1.72
90051 0.09000 1.55 1.65 1.72
90052 0.09000 1.55 1.65 1.72
90053 0.09000 1.55 1.65 1.72
90054 0.09000 1.55 1.65 1.72
When a consumer checks out of the store with their shopping cart, most eCommerce applications will email an invoice to the customer. Unfortunately, emailing receipts to customers is beyond the scope of this class! So you will need to write the invoice to a file. The format is described below. You will need to upload a sample output file along with the .cpp file.
Steps and Requirements
Follow the steps below to create your program.
Weight |
Modifier |
1-10 |
1x |
11-50 |
5x |
> 50 |
10x |
For example, total weight = 50 ounces shipped via USPS to 90001, results in amount = 5 * 1.55 = $7.55
After calling the above functions, the checkOut() routine should display the subtotal, tax, and total amounts to the screen. It should save the invoice or receipt to a file. You should print out the customer name at the top. Follow this with the item descriptions, price, quantity and extended price. Then print the subtotal, tax, shipping, and grand total (on separate lines of the file). Name the file “invoice.txt”.
In: Computer Science
Operating System Management
In: Computer Science