Questions
Create a generic superclass Shoe, which has at least 3 subclasses with attributes as shown below:...

Create a generic superclass Shoe, which has at least 3 subclasses with attributes as shown below: class Shoe: Attributes: self.color, self.brand class Converse (Shoe): # Inherits from Shoe Attributes: self.lowOrHighTop, self.tongueColor, self.brand = "Converse" class CombatBoot (Shoe): # Inherits from Shoe Attributes: self.militaryBranch, self.DesertOrJungle class Sandal (Shoe): # Inherits from Shoe Attributes: self.openOrClosedToe, self.waterproof Implement the classes in Python. Create a separate test module where 2 instances of each subclass are created. Test the methods by displaying their information.

In: Computer Science

a) What are the most important principals for designing a good input form? b) What would...

a) What are the most important principals for designing a good input form?

b) What would you specifically avoid in designing an input form?

c) Provide examples, good and bad

In: Computer Science

please use python to solve this problem. Math and String operations Write a script to perform...

please use python to solve this problem.

Math and String operations
Write a script to perform various basic math and string operations. Use some functions from Python's math module. Generate formatted output.

Basic math and string operations
Calculate and print the final value of each variable.

a equals 3 to the power of 2.5
b equals 2 b equals b + 3 (use +=)
c equals 12 c = c divided by 4 (use /=)
d equals the remainder of 5 divided by 3
Built-in functions abs, round, and min
Use abs, round, and min to calculate some values. These are all Python built in functions (see: BIF ).

Print the difference between 5 and 7.
Print 3.14159 rounded to 4 decimal places.
Print 186282 rounded to the nearest hundred.
Print the minimum of 6, -9, -3, 0
Functions from the math module
Use some functions from Pythons math module to perform some calculations.

Ask the user for a number (test with the value 7.6).
Print the square root of the number, rounded to two decimal places (include an appropriate description).
Print the base-10 log of the number, rounded to two decimal places (include an appropriate description)
(see https://docs.python.org/3/library/math.html).
Complex numbers
Do a calculation with complex numbers. Note that, while you might be familiar with the notation convention commonly used within mathematics for complex numbers (z = a + bi), Python uses the notation convention used in electromagnetism and electrical engineering (z = a + bj).

Assign z1 the value of 4 + 3j
Assign z2 the value of 2 + 2j
Assign z3 the value of z1 times z2
Print the value of z3
Add the following at the end of the script to show your results

In: Computer Science

Must be done in Ruby Histogram Create a Ruby program which reads a string of information...

Must be done in Ruby

Histogram
Create a Ruby program which reads a string of information and uses a Hash to keep track of letter frequencies and then displays a Histogram using this frequency information.

IN ORDER TO RECEIVE FULL CREDIT, YOUR CODE SHOULD PROPERLY PROCESS THE STRING INFORMATION, COUNTING FREQUENCIES BY USING A HASH.

A number of different program dialogues describe the program I am looking for.

Enter Data: supercalifragilisticexpialadocious
A - 4 - ****
C - 3 - ***
D - 1 - *
E - 2 - **
F - 1 - *
G - 1 - *
I - 6 - ******
L - 3 - ***
O - 2 - **
P - 2 - **
R - 2 - **
S - 3 - ***
T - 1 - *
U - 2 - **
X - 1 - *

In: Computer Science

Write a program to calculate the number of results obtained when solving the quadratic equation: ax2...

Write a program to calculate the number of results obtained when solving the quadratic equation: ax2 + bx + c =0 with given real inputs a, b, and c.

C++ programming

In: Computer Science

At Transport layer of Networks, we use segments to send data across. 1. Argue for using...

At Transport layer of Networks, we use segments to send data across.

1. Argue for using larger segments by discussing briefly why larger segments could be beneficial.

2. Then also argue why using small segments may be beneficial.

In: Computer Science

JAVA: Display all even numbers between 1 and 20 --Optional write a program that reads in...

JAVA:

Display all even numbers between 1 and 20

--Optional write a program that reads in 20 numbers. A method with an int parameter should display whether the number is odd or even for the number passed

In: Computer Science

QUESTION 1a A valid selection must be between 0 and 4. Enter the program below and...

QUESTION 1a

A valid selection must be between 0 and 4. Enter the program below and complete the while loop. Name the program question1.cpp, compile and run it.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
// Fill in the code to define an integer variable called selection
cout << "Please enter the choice of ticket "
<< "(a number from 1 to 4 or 0 to quit) " << endl;
cout << "Ticket Menu " << endl << endl;
cout << "1: Exclusive VIP area A " << endl;
cout << "2: VIP area B " << endl;
cout << "3: Elevated area " << endl;
cout << "4: General area R600 " << endl;
cout << "0: QUIT " << endl <<endl << endl;
cin >> selection ;
while (…………………) //complete the condition

{
cout << “Invalid choice – Please re-enter “;
cin >> selection;
}
cout << “You have selected option number “ << selection;
return 0;
}

QUESTION 1b

Modify question1.cpp by adding the code to calculate the cost per order. Make use of a switch statement.
cout << "You have selected option number "“ <<;
cout << "How many tickets would you like?" << endl;
// Fill in the code to read in number
// Fill in the code to begin a switch statement
// that is controlled by selection
{
case 1: cost = number * 3000;
cout << "The total cost is R " << cost << endl;
break;
// Fill in the code for the case VIP area B ( R2000.00 each)
// Fill in the code for the case Elevated area (R1200.00 each)
// Fill in the code for the case General area (R600.00 each)
case 0: cout << " Please come again" << endl;
break;
default:
cout << “Invalid selection”
cout << " Try again please" << endl;
}

In: Computer Science

C++ programming: FUNCTIONS WITH DIFFERENT RETURN TYPES AND PARAMETERS NuMetro has a special on movies for...

C++ programming: FUNCTIONS WITH DIFFERENT RETURN TYPES AND PARAMETERS

NuMetro has a special on movies for all members of the public but special discounts for students and pensioners. If pensioners or students buy a movie ticket they receive 10% if they buy a movie and popcorns, they receive 20% discount. Other customers only receive a discount when they buy a movie ticket and popcorn; there is no discount for just a movie ticket alone. Write a program named question5b.cpp that will consist of two functions. The program must prompt the user for type of customer (‘p’ for pensioner, ‘s’ for student, ‘o’ for other). It must then call the relevant function according to that entry. The first function must receive the customer type and calculates discount for pensioners and students. The second function calculates the discount for customers that are not pensioners or students.

In: Computer Science

a) What are the most important principals for designing a good report or visual? b) What...

a) What are the most important principals for designing a good report or visual?

b) What would you specifically avoid in designing a good report or visual?

In: Computer Science

C++ Question 4. Formulate the following conditions • A last name starts with the letter H....

C++ Question

4. Formulate the following conditions

• A last name starts with the letter H.

• A last name starts with the letters Mac.

• A last name comes before "Jones".

In: Computer Science

Show that if all nodes in a splay tree are accessed in sequential order, then the...

Show that if all nodes in a splay tree are accessed in sequential order, then the
total access time is O(N), regardless of the initial tree.

In: Computer Science

5.16 Implement function indexes() that takes as input a word (as a string) and a onecharacter...

5.16 Implement function indexes() that takes as input a word (as a string) and a onecharacter letter (as a string) and returns a list of indexes at which the letter occurs in the word.

>>> indexes('mississippi', 's')

[2, 3, 5, 6]

>>> indexes('mississippi', 'i')

[1, 4, 7, 10]

>>> indexes('mississippi', 'a')

[]

In: Computer Science

Explain how the modular kernel design combines the benefits of both the layered and microkernel structures.

Explain how the modular kernel design combines the benefits of both the layered and microkernel structures.

In: Computer Science

make a python script that has the following typed: school = “cochise college” place = “online”...

make a python script that has the following typed:

school = “cochise college”

place = “online”

Then do the following with the given parameters.Set the script to have a function that takes two parameters, school and place, have your function return the first 5 characters of each parameter value, utilizing a slice. Change the script to have a function that takes two parameters, school and place, have your function return the first character of each parameter, utilizing an index value. Then, Modify the script to have a function that takes two parameters, school and place, have your function return the last character of the variable place for each parameter, utilizing an index value. Next, modify the script to have a function that takes two parameters, school and place, have your function return the variables school and place in title form. Lastly, modify the python script to have a function that takes two parameters, school and place, have your function check to verify that ‘cochise’ is in the school parameter and ‘online’ is in the place parameter. If it is have the function return, ‘Great you go to Cochise College Online!’, else have the function return, ‘You should check out Cochise College Online!’

In: Computer Science