Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Create a class named MyClassCircle containing a parameterized constrictor of the class and a method name getArea(l that will calculate the area of the circle. Create another class names GetAreaDemo() that will contain the main method that will supply the arguments and display its output using the standard output stream.


Against All "Odds"

by CodeChum Admin


Looping numbers is fun, but it's even more exciting when we combine complex tasks to it, just like looping through a series of numbers and performing a series of code only to special numbers, like odd ones! And today, we're going to do just that.

Are you ready?


Instructions:

  1. Input a positive integer. This will serve as the starting point of the loop.
  2. Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line.
  3. Also remember that since the loop goes to descending order, a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0.

Input

A line containing an integer.

10

Output

Multiple lines containing an integer.

9
7
5
3
1





Traversing a Sorted Linear Array


USER INPUT THE ARRAY SIZE


Inserting Item into Sorted Linear Array


insertItem()


Get value of ITEM to be inserted.


Call findLocationInsert()


findLocationInsert()


Search for position which ITEM can be inserted and Return position


Deleting item into Sorted Linear Array


deleteItem()


Get value of ITEM to be deleted


Call findLocationDelete()


findLocationDelete()


Search for the position in which ITEM will be deleted and return position


main() - Display option similar to this:


1. Insert value 2. Delete value 3. Traverse array 4. Exit


Provide switch statement which cases for the shown options are written.


array must be checked if it's already full or not.


Enter your choice: 1


Enter element to inserted: 5


Array Basic Operations


1. Insert a value


2. Delete a value


3. Traverse the array


4. Exit


Enter your choice: 1


Enter element to inserted: 3


Array Basic Operations


1. Insert value


2. Delete value


3. Traverse array


4. Exit


Enter your choice: 3


The elements of the array: 3 5



CIDR -A router has the following (CIDR) entries in its routing table:

 

<span style="font-size:12.0pt; font-family:&quot;Times New Roman&quot;,serif;mso-ascii-theme-font:major-bidi;mso-hansi-theme-font: major-bidi;mso-bidi-theme-font:major-bidi;color:black">Destination Gateway</span>        Next hop

170.46.56.0/21                Interface 1

170.46.48.0/20                 Interface 3

176.53.40.0/22                Router 1

default gateway               Router 2


1. For each of the following IP address, what does the router do if packets with the following addresses arrive?

(a) 170.46.63.10/21

(b) 170.46.67.14/21

(c) 145.46.52.2 /22

(d) 176.53.40.7 /24

(e) 176.53.56.7/24

A router has the following (CIDR) entries in its routing table: Destination Gateway


2. What is the relationship between the “gateway” and “interface” fields?


Write a fruitful function sum_to(n) that returns the sum of all integer numbers up to and

including n. So sum_to(10) would be 1+2+3. . . +10 which would return the value 55.


I want very simple code because I am a student.


Write a program that reads a string and returns a table of the letters of the alphabet in

alphabetical order which occur in the string together with the number of times each letter

occurs. Case should be ignored. A sample output of the program when the user enters the data

“ThiS is String with Upper and lower case Letters”, would look this this:

a 2

c 1

d 1

e 5

g 1

h 2

I 4

l 2

n 2

o 1

p 2

r 4

s 5

t 5

u 1

w 2


I want a very simple code for students.



1. A parameterized constructor taking 4 arguments for bread slices, cheese slices, meat patty number and tomato slices. The values of the rest of the variables will be initialized by default to true 2. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 3. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 4. Provide setters for mustard, ketchup, iceberg and gilled 5. Provide getters for each of these variables 6. Provide a method calculatePrice() that calculates and returns the price of this sandwich according to the rates given in the above table.


SERIES OF OPERATIONS


myArray of numbers, write a JS program to perform the following steps and log the result.


Multiply each value with 9.


Subtract 20 from each value.


Multiply each value with 7.


Log the values of the resulting array separated by a space.


Input


The input will be a single line containing an array myArray


Output


The output should be a single line with values separated by a space


Constraints


Each value in the array must be a number


Sample Input


[ 12, 2, 2, 4, 1 ]


Sample Output


616 -14 -14 112 -77


You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum.


Input

-1000<= x <= -1000

-1000<= y <= -1000


Two int inputs separated by a space

100·100






Given two boolean values

isGrassTrimmerFound and isWaterHosePipeFound as inputs, create three JS promises using async/await and try/catch blocks.

Input

The first line of input contains a boolean isGrassTrimmerFound

The second line of input contains a boolean isWaterHosePipeFound

Sample Input 1

true

true

Sample Output 1

Grass Trimmed

Garden Cleaned

Watered Plants

Sample Input 2

true

false

Sample Output 2

Grass Trimmed

Garden Cleaned

Water Hose Pipe Not Found


"use strict";

/* Please do not modify anything above this line */

function main() {

const isGrassTrimmerFound = JSON.parse(readLine());

const isWaterHosePipeFound = JSON.parse(readLine());


/* Write code */

const myPromise = async () => {

try {

/* Write code */

} catch(error) {

/* Write code */

}

};

myPromise();

}


LATEST TUTORIALS
APPROVED BY CLIENTS