Questions: 11 448

Answers by our Experts: 10 707

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 base class called Subject



This class must have the following data members:



A c-string subject code that will hold a 7 character code, for example “TPG11BT”. A Boolean exam entry indicator that will hold a value indicating whether or not exam entry has been obtained for the subject.An array for storing test marks.A year mark for storing the calculated year mark or predicate



This class must have the following methods:A public default constructor that sets the data members to appropriate default



values.A copy constructor.A private calcYearMark method that calculates and stores a year mark obtained on a subject. A year mark of 40% or more is needed in order to obtain exam entry; adjust the exam entry indicator accordingly based on year mark

Can someone give me any alogrithims that show all functions in a calculator

Create a class named Complex which contains:

  • data field named real of type double
  • data field named imag of type double
  • no-arg constructor that initializes real & imag to 0
  • parametrized constructor with specified values for real & imag
  • overloaded stream extraction operator << that will display a complex number in the form a + bi
  • overloaded stream insertion operator >> that will ask the user for real and imag part of the complex number
  • overloaded binary + operator and a binary – operator
  • overloaded binary * operator and / operator
  • function mag() that will return the magnitude of the complex number.
  • function conjuage() that returns the conjugate of a complex number

Sample:

Enter the first complex number

Enter real part:  3

Enter imag part: 4

Enter the second complex number

Enter real part:  4

Enter imag part: -6

You entered the numbers

C1 = 3 + 4i

C2 = 4 – 6i

1: Addition

2: Subtraction

3: Multiplication

4: Division

5: Magnitude

6: conjugate

9: Quit

Enter your selection: 1

C1 + C2  = 7 - 2i



2.



1. Create a class node with following attributes



a. Data



b. Next pointer



c. constructor and destructor



d. accessor and mutator



2. Now create a class LLQueue with following attributes



a. Front pointer



b. Rear pointer



c. Enqueue: Adds an item to the queue.



d. Dequeue: Removes an item from the queue.



e. Peek



f. Length



g. Clever_display



h. Clever_search



i. Create a priority queue, that rearranges the colors in a rainbow fashion.



i. Red Orange Yellow Green Indigo Blue Voilet

Implement a calculator using bitwise operators and for loops only. Your program should run correctly for positive integers only. You calculator should be able to perform following operations. Basic arithmetic functions (Addition, subtraction, division and multiplication); Square – to compute the square of the given value and Power – to compute the power of an integer. It should take two int arguments number and its power. Any operation that uses operators other than bitwise operators will be awarded zero marks


Write a c++ program which produce the given sequence (in alternative arrangement and reverse order using for loop statement)





Example input: 5




Output: 5, 1, 4, 2, 3, 3, 2, 4, 1, 5

#include<stdio.h>

#include<conio.h>

void main(){

int num1, num2;

int temp=0;

printf("Enter two numbers");

scanf("%d %d" ,&num1,&num2);

 

while(((num1 + num2) % 5) !=0)

  {

   temp=num1+num2;

   num1=num2;

   num2= temp;

   printf("%d",temp);

}

getch();

}


Compound interest is the addition of interest to the principal (original) sum of a loan or deposit, or in



other words, interest on interest. It is the result of reinvesting interest, rather than paying it out, so that



interest in the next period is then earned on the principal sum plus previously-accumulated interest.



The compound interest is calculated using the formula below.




A = P(1 + (r/100))^n




Where:



A = total amount after n year



P = Principal or Original price



r = rate of interest per annum



N = number of years the money is invested







1 Write a program that will calculate the compound interest using the formula above with an annual interest



rate of 5.4 %.

Hope Michael, a DBIT student did 8 units in an exam and got different marks in each of the exam papers. She intends to calculate her total, mean score and exams verdict for the exams using a program written in C++. Requirements/Guide. (All the instructions below should be done in the same single program)

i. Assign 8 scores to Hope in a one-dimensional array. [2 Marks]

ii. Declare a function that takes an array of Hope’s scores as a parameter and calculates both the total and the mean score. [3 Marks]

iii. Pass the mean score from (ii) above into another function by reference, that computes whether Hope has passed or not given that a pass is 50 – 100 while a fail is 0 – 49.99 Marks. [3 Marks]

iv. Display Hope’s results as follows: (this is a sample output, use arbitrary values in your solution) [2 Marks]

Student Name: Hope Michael

Test Scores: 40, 50, 60, 80, 98, 82, 70, 32

Total Marks: 512

Mean Score: 64

Exams Verdict: Pass 

Draw a empty stairs patten using nested loop in c++

LATEST TUTORIALS
APPROVED BY CLIENTS