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

Let’s implement the concept of doubly linked list with a real time example.

For a bogie we need following information:

struct bogie{

string Name;

char type; //B for Business Class, F for First Class, and E for Economy class

int capacity; //Between 50-70

int fare; //For Business Class 1200, For First Class 1000, For Economy class 500

bogie *next;

bogie *prev;

};

bogie *engine //use as head for the train

Define a class, name it Train and write following functions for that class:

i. Insert a bogie at front();

ii. Insert a bogie at given position() //position will be defined based on name of bogie

iii. Insert a bogie at the end()

iv. return seating capacity of each type()

v. return total number of seats()

vi. return maximum fare collection based on total capacity of train()


The software shall calculate the monthly home loan repayment for buying a property



based on the values that the user entered. (See



https://www.sivavula.com/read/maths/grade-10/finance-and-growth/09-finance-and



growth-03 for more information on how to calculate this).



6.



If the monthly home loan repayment is more than a third of the user's gross monthly income, the software shall alert the user that approval of the home loan is unlikely.



7.



The software shall calculate the available monthly money after all the specified deductions



I have been made.



8.



The software shall not persist the user data between runs. The data shall only be stored in



memory while the software is running.

2. The user shall be able to choose between renting accommodation or buying a property. 3.



If the user selects to rent, the user shall be able to enter the monthly rental amount. 4. If the user selects to buy a property, the user shall be required to enter the following



values for a home loan:



a. Purchase price of the property



b. Total deposit



c. Interest rate (percentage)



d. Number of months to repay (between 240 and 360)

Consider the Farmer-Wolf-Goat-Cabbage Problem described below:

Farmer-Wolf-Goat-Cabbage Problem

There is a farmer with a wolf, a goat and a cabbage. The farmer has to cross a river with all three things. A small boat is available to cross the river, but farmer can carry only one thing with him at a time on the boat. In the absence of farmer, the goat will eat the cabbage and wolf will eat the goat. How can the farmer cross the river with all 3 things?

Initial state: (L, L, L, L)

Operators:

1.      Move farmer and wolf to the opposite side of river if goat and cabbage are not left alone.

2.      Move farmer and goat to the opposite side of river.

3.      Move farmer and cabbage to the opposite side of river if wolf and goat are not left alone.

4.      Move farmer alone to the opposite side of river if wolf and goat or goat and cabbage are not left alone.

Goal state: (R, R, R, R)

Write a Python program that uses breadth-first search algorithm to solve the above problem.


Print the following pattern

1

2 2

3 3 3

4 4 4 4

5 5 5 5 5


write a program to print half of the numbers


Write a C program in CodeBlocks to find the largest among three different numbers entered by the user using Nested if else Statement and also construct a flow chart for this program

Create two classes named Mammals and MarineAnimals. Create another class named BlueWhale 

which inherits both the above classes. Now, create a function in each of these classes which prints 

"I am mammal", "I am a marine animal" and "I belong to both the categories: Mammals as well as 

Marine Animals" respectively. Now, create an object for each of the above class and try calling

 function of Mammals by the object of Mammal

 function of BlueWhale by the object of BlueWhale

 function of each of its parent by the object of BlueWhale

 function of MarineAnimal by the object of MarineAnimal


Create a class named Shape with a function that prints "This is a shape". Create another class named Polygon inheriting the Shape class with the same function that prints "Polygon is a shape". Create two other classes named Rectangle and Triangle having the same function which prints "Rectangle is a polygon" and "Triangle is a polygon" respectively. Again, make another class named Square having the same function which prints "Square is a rectangle".

Now, try calling the function by the object of each of these classes.


We want to calculate the total marks of each student of a class in Physics, Chemistry and Mathematics and the average marks of the class. The number of students in the class are entered by the user. Create a class named Marks with data members for roll number, name and marks. Create three other classes inheriting the Marks class, namely Physics, Chemistry and Mathematics, which are used to define marks in individual subject of each student. Roll number of each student will be generated automatically.


LATEST TUTORIALS
APPROVED BY CLIENTS