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

write a function called findsequence.

the function takes a 4-digit integer as parameter, validates and returns 1 when the digits are in increasing order or 2 when the digits are in decreasing order or 0 when the digits are not in any order.



As we know that network is a set of connected devices and Whenever we have multiple devices, we have the problem of how to connect them to make one-to-one communication possible. What methods/techniques are used to solve this problem.


String Slicing

Given two strings

inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.Input

  • The first line of input contains a string inputString
  • The second line of input contains a string subString

Output

  • The output should be a sliced string or inputString (if the inputString does not include the subString)

Sample Input 1

JavaScript

S

Sample Output 1

Script

Sample Input 2

Language

air

Sample Output 2

Language









totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescriptionisSubmergedIt should contain a boolean value to indicate whether the submarine is submerged or not.

MethodDescriptiondiveWhen this method is called, it should set the value of isSubmerged to true and log "Submarine Submerged" text in the console.surfaceWhen this method is called, it should set the value of isSubmerged to false and log "Submarine Surfaced" text in the console.

Add a sub class weaponUnit which extends to Submarine with the below properties and methods,

The sequence of operations is,

  1. Submerge the Submarine
  2. Fire torpedos
  3. Surface the Submarine

Sample Input 1

5

2

Sample Output 1

Submarine Submerged

2 Torpedos Fired, 3 Left

Submarine Surfaced

Sample Input 2

10

2

Sample Output 2

Submarine Submerged

2 Torpedos Fired, 8 Left

Submarine Surfaced




Define a class Student with data members as rollno and name. Derive a class Fees from student

that has a data member fees and functions to submit fees and generate receipt. Derive another class

Result from Student that displays the marks and grade obtained by the student. Write a program that

extends the class Result so that the final result of the Student is evaluated based on the marks obtained

in tests, activities and sports.


Write a program that has a class Train with data members seats_first_class, seats_second_class

and seats_ac_2tier and member functions to set and display data. Derive a class Reservation that has

data members booked_first_class, booked_second_class and booked_ac_2tier and functions to book

and cancel tickets and display status.


Write a program for a publishing company that markets both printed books and audio visual

lectures stored on CDs. Write a class Publication thatstores title and price. Derive a class book which

has an additional member as no_pages and a class Lecture with member play_time.


Create a class called Employee with protected data members emp_id, name and designation. It

contains the member functions to get details of employee and display them. Derive two classes

Permanent and Contract from Employee class. Contract has data members num_hrs and

wages_per_hr. Permanent has basic, DA, TA and HRA. Get the necessary details using member

functions and display the employee details with their salary according to the given data.


Create a class named EB_amount. It has the data members units_used and bill. Use member

function to set unit_used. Upto 200 units 3 rupees per unit, 201 to 500, 4 rupees per and above 500

5.5 rupees per unit are allotted by EB. Calculate the bill amount and display the amount. Create

another class Salary with basic, DA and HRA. Set basic by a member function. 104 percent of basic

is assigned as DA and 10 percent is allotted as HRA. Display the total salary. Derive a class Budget

contains income, tuition_fee, house_rent, saving, grocery, eb_bill as data members. Set the values

and get the values of income and eb_bill from parent classes. Display the budget details.


Create a base class called Shape which has two double type values. Use member functions get()

and set() to get and set the values. Use a virtual function display_area() to display the area. Derive

two specific classes called Triangle and Rectangle from the base class Shape. Redefine

display_area() in the derived classes. Write a program to display the rectangle or triangle area.


LATEST TUTORIALS
APPROVED BY CLIENTS