(Java program) Write an applet that draws two animated cars that must race each other. The race cars should move along a straight line, with each starting behind a Start Line. The user should have the option to set the speed of each car. The speed range is 0 to 100. There should be a Start button to begin the race and an End button to stop the race at any time.
In: Computer Science
Explain the Windows Recovery Environment. How is it used?
In: Computer Science
Respond to the following in a minimum of 175 words:
One of the most important concepts of programming is handling input and output. The following activity will allow you to get familiar with this concept specifically when using Python.
Write a function to add two values and display the results.
Discuss the steps in your thought process as you created the code, any issues you encountered, and how you solved those issues.
In: Computer Science
1. All members may be public for this example
2. You will need three data members:
a. An array of 3 doubles to keep the votes
b. An array of 3 strings to place the candidates names
c. An array of 3 doubles to place the calculates vote
breakdown
3. You will need three methods:
a. A constructor that receives three strings and sets the names of
the candidates to these strings and set all the votes initially to
zero.
b. A "calcPercentages" method that has no arguments or return
values and simply calculates each vote percentage as one vote count
divided by the sum times 100
c. A "display Results" method that has no arguments and displays
each candidate's names and vote percentage.
source:
#include <iostream> //for
cout
#include <string> //for
string
#include <stdlib.h> //for
rand, srand
#include <time.h> //for
time
using namespace std;
//DO NOT EDIT ANY CODE ABOVE THIS LINE EXCEPT FOR LINE 12 (EDITOR'S
NAME)
class CElection
{
public:
};
//DO NOT EDIT ANY CODE BELOW THIS LINE!
int main(void)
{
//Instantiate a CElection object with three
names:
CElection TOOP("Alice","Bob","Other");
//First display a hello message
cout << "\n\n* Welcome to Decision 2019
*\n";
//Randomize the PRN
srand(time(NULL));
int vote;
for (int i=1;i<=10000;i++)
{
vote = rand()%5;
switch (vote)
{
case 0:
case 1:
TOOP.votes[0]++;
break;
case 2:
case 3:
TOOP.votes[1]++;
break;
case 4:
TOOP.votes[2]++;
}
}
TOOP.calcPercentages();
TOOP.displayResults();
}
In: Computer Science
Write a java program:
Write a program that creates a text file. Write to the file three lines each line having a person's name. In the same program Append to the file one line of 'Kean University'. In the same program then Read the file and print the four lines without lines between.
In: Computer Science
Electronic Commerce - Airbnb
The focus of chapter 10 is on the topic of electronic commerce. E-commerce can be defined as using the Internet and the web to transact business. Global business to consumer e-commerce is soon expected to surpass $3 trillion dollars in sales. Needless to say, electronic commerce is revolutionizing the way we do business. By doing a search of the Internet or by other research methods, find how Airbnb has adopted an e-commerce business model.
Ponder the following questions (answer as many as you can):
1) What was the main driving force or strategy behind Airbnb decision to deploy e-commerce?
2) Has the adoption of e-commerce changed their traditional business model? In what ways?
3) Does their e-commerce business conflict with their traditional bricks and mortar business or does it enhance the traditional offering? Explain.
4) From table 10-5 on page 384 of the Laudon text, identify which Internet business model closely resembles the e-commerce model of this organization?
5) What role does social networking play in the marketing strategy of Airbnb?
6) Who are the organization's main competitors? How does this organization differentiate their e-commerce web site / offerings from their competitors?
7) Has the e-commerce aspect of their business been successful?
8) What recommendations would you make, if any, to improve the Airbnb web site or e-commerce features?
In: Computer Science
In Java, C, C++ or Python
Develop a simulation program to simulate an 8-port Ethernet switch. The switch initially has no knowledge about the hosts connected to each port. It learns frame addresses and stores-and-forwards the frames. The input text file "in.txt" contains information of the incoming frames, one frame per line. There are 4 pieces of data per line: frame ID, arrival port, frame source address, and frame destination address. The frames arrive at the switch in the order of which they appear in the input file. Destination address "X" indicate a broadcast frame. The output text file "out.txt" has 8 lines. Each line lists all the frames departing from each port, Here is an example:
"in.txt" contains 5 incoming frames:
F1 P2 B--A
F2 P6 D--C
F3 P5 E--B
F4 P7 F--D
F5 P6 D--X
"out.txt" should list the departing frames on each port:
P1: F1 F2 F5
P2: F2 F3 F5
P3: F1 F2 F5
P4: F1 F2 F5
P5: F1 F2 F5
P6: F1 F4
P7: F1 F2 F5
P8: F1 F2 F5
please output out.txt for this input file input.txt
F1 P1 A--G F2 P1 B--H F3 P1 C--I F4 P2 D--E F5 P2 D--F F6 P7 G--A F7 P8 H--B F8 P8 I--C F9 P4 E--D F10 P4 F--D F11 P7 G--X F12 P1 B--G F13 P2 D--G F14 P4 E--G F15 P8 H--G F16 P1 A--D F17 P1 B--E F18 P1 C--F F19 P2 D--H F20 P8 H--I
In: Computer Science
In c++ please.
Write a program that reads the contents of two text files and compares them in the following ways:
It should display a list of all the unique words contained in both files.
It should display a list of the words that appears in both files.
It should display a list of the words that appears in the first file, but not the second.
It should display a list of the words that appears in the second file, but not the first.
It should display a list of the words that appears in either the first or second file, but not both.
In: Computer Science
Give a Uml diagram illustarting aggregation. Include classes, fields methods instance fields etc. Use one supper class and two sub classes includes pseudo code for at least one method of each class. also expalin the whole part relationship in detail.
In: Computer Science
Write a java program:
Write a nested loop program creating an array list of three positions. The first loop terminates with a sentinel value of which user is prompted for input to continue of quit. Inside loop to enter in each position a prompted input of person's first name. After the inside loop, edit the second array location making its value "Boston". Print the array's contents.
In: Computer Science
In: Computer Science
In databases, Normalization used to reduce redundancy and update anomalies from the tables. There are several Normal forms that are used in database 1NF, 2NF, BCNF etc.
The term functional dependency is very important in NF. Multivalued attributes, Atomicity property etc. plays important role in NF
Action Items
In: Computer Science
This program (in python) will display a set of authors and the number of novels written by each author in both a table and a histogram. You will ask the user for all of the information. Using what you learned about incremental development, use the following approach to create your program:
Enter a title for the data: Number of Novels Authored You entered: Number of Novels Authored
Enter the column 1 header: Author name You entered: Author name Enter the column 2 header: Number of novels You entered: Number of novels
Enter a data point (-1 to stop input): Jane Austen, 6 Author: Jane Austen Number of Novel(s): 6
If the error occurs, output the appropriate error message and
prompt again for a valid data point. You can assume that if a comma
is present, then the data point is entered correctly.
Ex:
Enter a data point (-1 to stop input): Ernest Hemingway 9 Error: No comma in string. Enter a data point (-1 to stop input): Ernest Hemingway, 9 Author: Ernest Hemingway Number of Novel(s): 9
Number of Novels Authored Author name | Number of novels -------------------------------------------- Jane Austen | 6 Charles Dickens | 20 Ernest Hemingway | 9 Jack Kerouac | 22 F. Scott Fitzgerald | 8 Mary Shelley | 7 Charlotte Bronte | 5 Mark Twain | 11 Agatha Christie | 73 Ian Flemming | 14 J.K. Rowling | 14 Stephen King | 54 Oscar Wilde | 1
Jane Austen ******
Charles Dickens ********************
Ernest Hemingway *********
Jack Kerouac **********************
F. Scott Fitzgerald ********
Mary Shelley *******
Charlotte Bronte *****
Mark Twain ***********
Agatha Christie *************************************************************************
Ian Flemming **************
J.K. Rowling **************
Stephen King ******************************************************
Oscar Wilde *
For this program, you can assume that the user will not enter duplicate author names
In: Computer Science
When we look at cloud usage the categories can include some of but is not limited to following:
· SaaS: Software as a Service
· PaaS: Platform as a Service
· IaaS: Infrastructure as a Service
· MaaS: Monitoring as a Service
Research cloud computing. Complete a 2-3-page paper with an abstract and conclusion(plus cover sheet and reference page) that:
· Describe at least 3 types of cloud computing service categories
· What are the architecture considerations?
· Give details of the function of the service with an example
· What are the advantages and disadvantages of the service?
· What are the security risk and protection considerations?
· Do you see any impact on availability and performance?
Specific questions or items to address:
· Describe at least 3 types of cloud computing service categories
· What are the architecture considerations?
· Give details of the function of the service with an example
· What are the advantages and disadvantages of the service?
· What are the security risk and protection considerations?
· Do you see any impact on availability and performance?
In: Computer Science