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

program in C++ in which you have to make a class Airplane having the three attribute name, direction and speed. The direction attribute can have four constraints including East, West, South and North. You have to make a constructor initialize all the attribute values. Assuming the direction around you, make a function that will change the direction of the airplane. If the airplane is headed towards the east and you call the direction function, it should rotate the plane to 90 degrees right and make the direction pointer south and so on. After that, you have to overload the same function that can accept the direction directly and set it according. You also have to make two member functions that can control the speed of an airplane one for increasing speed and the other for decreasing speed

   you have to add a function class that will show us how many airplanes have been built. start of program “there is no airplane built yet”.


def square_area(matrix,l_x,l_y,side_length):

  count=2

  for i in range(l_x,l_y+side_length):

    for j in range(l_y,l_y+side_length):

      if matrix[i][j]==1:

        count+=1

      else:

        return 0

  return count 

m,n=map(int,input().split())

markers={'X':1,'O':0}

matrix=[[markers[i] for i in input().split()] for _ in range(m)]

areas=[]

for l_x in range(m):

  for l_y in range(n):

    for side_length in range(1,min(n-l_y+1,m-l_x+1)):

      areas.append(square_area(matrix,l_x,l_y,side_length))

print(max(areas))

ouput:5

it should print output:4

for some test cases wrong?


Write a program to book movie tickets online.

Use File Handling and inheritance concept, and other c++ logics.


The Output should include:

1)Available Movies


2)book ticket

(select movie, select time, pay and get seat number)


3)Cancel ticket

(enter seat number to cancel)


4)Show record


5)Exit


Write a C++ Program to Calculate Percentage, GPA, CGPA.

Use File Handling and multiple inheritance concept and other c++ logics also.


The Output should include:

1)Percentage

2)GPA

3)CGPA

4)Exit


How to explain this code?



import pathlib 

import json



class Account:

  #Constructor

  def __init__(self):

    self.username =""

    self.password =""

    self.name =""

    self.suname =""

    self.birthDate =""

    self.listFriends = [] #(characterised by the account username)

       

  #This function allows to create a new Account

  def signUp(self):

    self.username =input("Enter the username: ")

    self.password =input("Enter the password: ")

    


Add GUI in this code:


Example: Simple Calculator using switch statement

ADD GUI IN THIS CODE:

# include <iostream>
using namespace std;

int main() {
    char op;
    float num1, num2;

    cout << "Enter operator: +, -, *, /: ";
    cin >> op;

    cout << "Enter two operands: ";
    cin >> num1 >> num2;

    switch(op) {
        case '+':
            cout << num1 << " + " << num2 << " = " << num1 + num2;
            break;

        case '-':
            cout << num1 << " - " << num2 << " = " << num1 - num2;
            break;

        case '*':
            cout << num1 << " * " << num2 << " = " << num1 * num2;
            break;

        case '/':
            cout << num1 << " / " << num2 << " = " << num1 / num2;
            break;

        default:
            // If the operator is other than +, -, * or /, error message is shown
            cout << "Error! operator is not correct";
            break;
    }

    return 0;
}

Develop a C program for File Operations that stores n number of the Alphabets from A to Z in a file and display it.


For a given pair of words check if they are anagrams. Print

YES


if they are anagrams, or else print

NO


.

Two words are anagrams if one word can be obtained by the rearrangement of the characters in another word. Ex:

knee


and

keen


are anagrams

Note: All characters in the input will be in lower case.


Area of Square:

you answered like this:

But this is actually calculating the area of a rectangle :

ex:

3 6

O X X X X X

O X X X X X

O X X X X X

def X_Only(Matrix:list):
    for row in Matrix:
        for cell in row:
            # check if value is not X
            if cell!='X':
                return False
    return True
def sub_size(lent:int):
    for start in range(lent):
        for stop in range(start+1, lent+1):
            yield(start, stop)
def squareAreaWithX(matr:list, M:int, N:int):
    maximum_area = 0
    for begin_x, stop_x in sub_size(M):
        for begin_y, stop_y in sub_size(N):
            temp_matrix = [i[begin_y:stop_y] for i in matr[begin_x:stop_x]]
            if X_Only(temp_matrix):
                x= stop_x-begin_x
                y= stop_y-begin_y
                if maximum_area < x*y:
                    maximum_area=x*y
    print(maximum_area)
while True:
    s = input()
    M, N = [int(i) for i in s.split()]
    matrix=[]
    for i in range(0,M):   
        matrix.append([N for N in input().split()]) 


    squareAreaWithX(matrix, M, N)

.data

Val1 BYTE 10,20,5 DUP(3) ; i. _______________

Val2 WORD 8 DUP(3 DUP(?)) ; ii. ______________

Val3 WORD 20,30,10 DUP(20) ; iii. _____________

Val4 DWORD 30 DUP(?),0,0 ; iv. ______________

.code

mov cx,SIZEOF Val1 ...


LATEST TUTORIALS
APPROVED BY CLIENTS