Java Code.
Using Decorator pattern make class BurgerToppings:
-Each topping is an extra $1 and the name provided in the constructor
-getTotalPrice: returns total price of burger + toppings
-getDetails: returns the burger name + name of topping with the word (extra)
Code:
public interface Burger{
double C();
String getDetails();
}
public class BigMac implements Burger{
private String order;
private double price ;
public BigMac() {
this.order= "Big Mac";
this.price = 4.00;
}
@Override
public double getPrice() {
return price;
}
@Override
public String getorder() {
return name;
}
}
Output expected:
Ordering BigMac + extra pickles+ extra cheese
Total price = 6.0
In: Computer Science
Java Code.
Using Decorator pattern make class BurgerToppings:
-Each topping is an extra $1 and the name provided in the constructor
-getTotalPrice: returns total price of burger + toppings
-getDetails: returns the burger name + name of topping with the word (extra)
Code:
public interface Burger{
double C();
String getDetails();
}
public class BigMac implements Burger{
private String order;
private double price ;
public BigMac() {
this.order= "Big Mac";
this.price = 4.00;
}
@Override
public double getPrice() {
return price;
}
@Override
public String getorder() {
return name;
}
}
Output expected:
Ordering BigMac + extra pickles+ extra cheese
Total price = 6.0
In: Computer Science
You want to reduce text communication with your
corrupt friends in Wall Street. You suggest
using Huffman coding to reduce the number of bits in
communication.
You look over your previous 100 words of texts. You find the
following words and their number
of occurrence in parenthesis: SELL (12), BUY (8), MOVE (19), HIDE
(42), STOP (2) and WATCH
(17). This frequency is consistent over all your messages.
(a) What codewords do you recommend for each word?
(b) Whit these codewords, how many bits of communication do you
need when texting 100
words compared to a fixed-length code?
In: Computer Science
You will utilize a large dataset to create a
predictive analytics algorithm in Python.
For this assignment, complete the following:
Utilize one of the following Web sites to identify a dataset to use, preferably over 500K from Google databases, kaggle, or the .gov data website
Utilize a machine learning algorithm to create a
prediction. K-nearest neighbors is recommended as an introductory
algorithm. Your algorithm should read in the dataset, segmenting
the data with 70% used for training and 30% used for testing.
Illustrate the results as output.
Create a Microsoft Word document that describes how
this algorithm could be used to predict new records that are
generated. This is often called scoring new
records
In: Computer Science
Making decisions on what to do can be difficult if there are many options and different requirements (criteria) that affect the decision. A practical way to help make decisions that involve selecting the best option from many based on how well each option satisfies each criterion is an “advanced prioritization matrix”. Using an example of purchasing a new car, television, cell phone, computer or any other item, construct an “advanced prioritization matrix” showing all options, multiple criteria, weight of each criteria and your scoring for each options against each criterion and the total score for each option. Use the table format in Word or Excel spreadsheet to demonstrate your example.
In: Operations Management
Write a 2-3 page paper on the economic impact of globalization on the US economy. Comment on national income, US debt, unemployment, foreign exchange/currency, security, technology, etc.
Ideally, argue for or against using some of the topics suggested. Consider both the positive and negative effects and summarize on whether the costs or benefits outweigh the other.
Pay attention to content, writing mechanics, APA style (apa.org) and ensure originality, cite and reference in other words support your analysis with a body of knowledge.
Submit on a word document first to the link to check similarity percentage which needs to be 25% max and then submit the final draft to Assignment link for grading.
In: Economics
Making decisions on what to do can be difficult if there are many options and different requirements (criteria) that affect the decision. A practical way to help make decisions that involve selecting the best option from many based on how well each option satisfies each criterion is an “advanced prioritization matrix”. Using an example of purchasing a new car, television, cell phone, computer or any other item, construct an “advanced prioritization matrix” showing all options, multiple criteria, weight of each criteria and your scoring for each options against each criterion and the total score for each option. Use the table format in Word or Excel spreadsheet to demonstrate your example.
In: Operations Management
------An analog signal is sampled, quantized, and encoded into a binary PCM wave. The number of representation levels used is 1024. A synchronizing pulse is added at the end of each code word representing a sample of the analog signal. The resulting PCM wave is transmitted over a channel of bandwidth 24kHz using a 8 PAM system with raised-cosine spectrum. The rolloff factor is 0.5.
(a) Find the rate (bit/s) at which information is transmitted through the channel.
(b) Find the rate at which the analog signal is sampled. What is the maximum possible value for the highest frequency component of the analog signal?
is using a 8 PAM system is different from using a quaternary PAM in this example ?????
thanks
In: Electrical Engineering
In the C programming language, implement the translation from regular English to Euroglish. If the letters were uppercase, keep them uppercase in the replacement.
1. Remove one“e”from the end of words that are more than three characters long, if they happen to end in “e”.
2. Change all double letters to a single letter (including double spaces). Do not remove double line spacing (i.e. “\n”).
3. When a word ends in “ed”, change that to just “d”.
Text:
The cat in the hat roamed around the world.
Here is a weird sentence.
We love to code
They fumed and fumed. They laughed and laughed
Better a bird in the hand than two in the tree.
In: Computer Science
In: Economics