Write an application with five classes Vehicle, Car, Bus, Truck, and Tester class with main method in it.
The following characteristics should be used: make, weight, height, length, maxSpeed, numberDoors, maxPassenges, isConvertable, numberSeats, maxWeightLoad, and numberAxels.
Characteristics that are applicable to all vehicles should be instance variables in the Vehicle class. The others should be in the class(s) where they belong.
Class vehicle should have constructor that initializes all its data. Classes Car, Bus, and Truck will have constructors which will reuse their parents constructor and provide additional code for initializing their specific data.
Class Vehicle should have toString method that returns string representation of all vehicle data. Classes Car, Bus, and Truck will override inherited toString method from class vehicle in order to provide apropriate string representation of all data for their classes which includes inherited data from Vehicle class and their own data.
Class Tester will instantiate 1-2 objects from those four classes (7 total) and it will display the information about those objects by invoking their toString methods.
In: Computer Science
javaScript
html receives an entry of a character string in a text box, when a button is clicked, the count of vowels in the string stored in the textbox is displayed. The html file contains one function: vowelcount().
vowelcount(): returns the number of uppercase and lowercase English language vowel letter that occurs in the string entry in the textbox.
//html:
<!--
YOUR ID
YOUR NAME
-->
<html>
<head>
<script>
function vowelcount()
{
/* YOUR CODE HERE */
}
</script>
</head>
<body>
<input type="text" name="numbers" id="numbers">
<input type="button" name="button" value="click"
onclick="vowelcount();">
<p id="result"> </p>
</body>
</html>
In: Computer Science
Match the concept with its definition and characteristics.
(not all options are used)
|
|
In: Computer Science
message = 'youcannotdecodemyciphertexttoday'
def transposition_cipher_encode(plain_text, key):
# the input, key should be a permutation of integers 0 to some
number
# your code here
return
need code in PYTHON
In: Computer Science
1. Implement the graph ADT using the adjacency list structure.
2. Implement the graph ADT using the adjacency matrix structure.
LANGUAGE IS IN JAVA
Comment for any questions
Data structures and algorithms
In: Computer Science
To do our analysis, let's look at one of the giants
Please read these online resources.
Walmart. Read and explore these online resources pertaining to Walmart's history and Information System usage.
write an informal paragraph or two on why you think Walmart has become so successful. Using chapter 7, "DOES IT MATTER," read, think about what technology gave Walmart a competitive advantage. Do you think they needed to manage any of Porter's Five Forces? Provide your own insight.
In: Computer Science
In: Computer Science
You will write Stack class in c++ that will be integrated into a larger software product provided by the instructor. This Stack class uses a dynamically allocated array to store data values (integers) that have been pushed onto the stack object. When the client code attempts to push another integer onto a full stack, your Push operation should invoke the Resize() function which attempts to double the capacity of the stack and then add the new data value to the resized stack array. In Resize() a new array (that holds twice as many integers) is dynamically allocated, data from the old stack array is copied into the new larger stack array, the old stack array is deallocated, and the new data value is pushed onto the new array.
In: Computer Science
C++ Assignment Inheritance
This uses some single arrays of doubles. We can use Vectors instead if we want! Choice either vectors or arrays either one is fine
We will implement a classic Inheritance hierarchy. A simple console based interface is all that is needed. Build your classes first, each in their own .h and .cpp files, then test them with the simple main method provided below.
Phase 1 :
Here is the following set of classes you will implement and their inheritance relationship:
Account
The generic BASE class Account will serve as the parent class to Checking, Savings and CreditCard.
Variables (private):
name - Name of account owner, a string
taxID - social security number, a long
balance - an amount in dollars, a
double
Variables (protected):
last10withdraws - a double array of size 10. The last 10
withdrawal amounts.
last10deposits - a double array of size 10. The last 10 deposit amounts.
numdeposits - number of deposits, an int
numwithdraws - number of withdrawals, an
int
Methods:
SetName, SetTaxID, Setbalance() assigns a new value for
each with error checking
GetName, GetTaxID, Getbalance() returns a value for each variable.
MakeDeposit( double amount ) - adjust the balance and put it in the deposit array
A constructor with no parameters and one with name, taxID and balance parameters
display() a method to display the name, taxID and
balance
Checking
A specific DERIVED class that represents a bank checking account. It must inherit Account.
Variables (private):
last10checks - an int array of size 10. The last 10 check
numbers.
Methods:
WriteCheck( int checknum, double amount ) - adjust the
balance and list it as a withdraw in the base class
A constructor with no parameters and one with name, taxID and balance parameters
display() - display the accounts check register (number
and amount) and deposit record
Savings
A specific DERIVED class that represents a bank savings account. It must inherit Account.
Methods:
DoWithdraw( double amount) - adjust the balance and list it
as a withdraw in the base class
A constructor with no parameters and one with name, taxID and balance parameters
display() - display the accounts withdrawal and deposit
record
CreditCard
A specific DERIVED class that represents a credit card account. It must inherit Account.
Variables:
cardnumber - a long
last10charges - a string array of size 10. The last 10
names of the charges.
Methods:
DoCharge( string name, double amount ) - adjust the balance
and list it as a withdraw in the base class
MakePayment( double amount) - adjust the balance and list it as a DEPOSIT in the base class
A constructor with no parameters and one with name, taxID and balance parameter
display() - display the accounts charges ( name and amount
) and deposit record
Note: all display() methods should use cout to output text to the console.
Write a main() Function
Write a main that creates 3 objects, starts each with a balance of $100. Create a loop that displays the following menu each time through the loop. Make sure the balance is updated each time AND you use the objects to perform the transactions.
Checking balance: $100 Savings balance: $100 Credit Card balance: $100
1. Savings Deposit
2. Savings withdrawal
3. Checking Deposit
4. Write A Check
5. Credit Card Payment
6. Make A Charge
7. Display Savings
8. Display Checking
9. Display Credit Card
0. Exit
In: Computer Science
Write a Java program that takes an array of 10 "Int" values from the user and determines if all the values are distinct or not. Return TRUE if all the values of the array are distinct and FALSE if otherwise.
In: Computer Science
You are working in a company as a sales manager. You
are not happy with your Job and want to leave it. Write an email to
your friend telling him/her about your plan.
You should write in your email:
A. Some information about your job
B. Reasons for leaving the job
C. Your plans after you leave the job
In: Computer Science
plz answers these short Qs in python language
Q1-Given three int variables that have been given values, areaCode, exchange, and lastFour, write a string expression whose value is the string equivalent of each these variables joined by a single hyphen (-) So if areaCode, exchange, and lastFour, had the values 800, 555, and 1212, the expression's value would be "800-555-1212". Alternatively, if areaCode, exchange, and lastFour, had the values 212, 867 and 5309 the expression's value would be "212-867-5309"
Q2-Write statement that defines plist to be a list of the following ten elements: 10, 20, 30, ..., 100 in that order.
Q3-Associate True with the variable has_dups if the list list1 has any duplicate elements (that is if any element appears more than once), and False otherwise
Q4-Given that plist has been defined to be a list of 30 elements, add 5 to its last element. You can assume that the last element is a number.
.
In: Computer Science
Select a recent strategic initiative (business or IT driven) at your current or recent employer (For example, new product category/service launch, change in IT focus/capability, outsourcing/insourcing initiative, change in customer focus, etc.). Analyze the initiative, using the elements listed in the grading rubric below.
:
I. Description of the Initiative –
II. Impact on the balance of the strategic triangle -
III. Stakeholders and how they were impacted–
IV. What worked really well --
V. What should have been done differently –
In: Computer Science
public int f8( int[] arr, int index ) { if ( index == -1 ) return 0; if (arr[index] == 2) return 1 + f8( arr, index - 1 ); return f8( arr, index - 1); }
In: Computer Science
C++ Assignment
Do an original example of hybrid inheritance. Throw in a has-a in at least one of your classes for good measure.
In: Computer Science