1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Assoli18 [71]
3 years ago
9

Rita is writing a C++ programe in whic, she wants to display the grades (stored in variable grade) as per the table of marks (st

ored in variable marks) given below: A – 90-100 B – 80-89 C – 70-79 D < 70
Computers and Technology
1 answer:
qwelly [4]3 years ago
7 0
#include <iostream>
#include <vector>
using namespace std;

class Student
{
public:    
    Student(int mark)    
    {        
        this->mark = mark;

        if (mark >= 90 && mark <= 100)
            grade = 'A';
        else if (mark >= 80 && mark <= 89)            
            grade = 'B';
        else if (mark >= 70 && mark <= 79)
            grade = 'C';
        else if (mark < 70 && mark >= 0)
            grade = 'D';
        else
            cout << "Invalid mark, grade not assigned";
    }

    int getMark()
    {
        return mark;
    }

    char getGrade()
    {
        return grade;
    }

private:
    int mark;
    char grade;
};

int main()
{
    vector<Student> students;
    int num, mark;

    cout << "Enter number of students: ";
    cin >> num;

    if (num <= 0)
        cout << "Invalid number of students, exiting";
    else
    {
        for (int i = 1; i <= num; i++)
        {
            cout << "Enter marks for student " << i << ": ";
            cin >> mark;

            Student s(mark);
            students.push_back(s);
        }
    }

    // do whatever you like with the vector from here onwards, such as:
    /*
    for (int i = 0; i < students.size(); i++)
    {
        cout << "Student " << i + 1 << " grade: " << students[i].getGrade() << endl;
    }
    */

    return 0;
}
You might be interested in
What is the chip that allows the screen to work
Luba_88 [7]

Answer:

V-chip technology works much like closed captioning and uses the vertical blanking interval in the television signal.

3 0
2 years ago
Read 2 more answers
What is the fundamental goal of outsourcing? increased quality brand expansion cultural diversity cost savings
galben [10]

Answer:

Cost saving is the fundamental goal of outsourcing.

Explanation:

Initially the companies where outsourcing task only for Cost cutting. But nowadays, the companies do that for so many other reasons like, increase the efficiency, reducing overhead, to concentrate on core business peacefully, to obtain more profit, etc.  

The cultural diversity does not affect or make companies to outsource.

We can indirectly increase the quality but it is not the primary goal of outsourcing.  

Brand expansion will holds good, only the BPO is run under the name of the company. But this is once again not the major objective.

7 0
3 years ago
A user contacted the help desk to report that the laser printer in his department is wrinkling the paper when printed. The user
Ira Lisetskai [31]

Answer:

Option A and Option E are correct.

Explanation:

A user informed the call center to complain that their office's laser printer damages every paper while it is printed. The user well into the distribution tray reviewed those papers although it's glossy and wrinkle-free.

So the purpose behind it is that the paper doesn't reach the printer's specifications, or even when going thru the printer, the paper becomes moist.

8 0
4 years ago
A father carries the Xga blood group trait and passes it on to all of his daughters, who express it, but to none of his sons. Th
Alecsey [184]

Answer:

The correct answer to the following question will be "X-linked dominant".

Explanation:

  • X-linked dominant inheritance, also referring to it as X-linked domination, is a hereditary inheritance process through which the X chromosome bears a dominant gene.
  • This is less prominent as a pattern of inheritance than the recessive type that is connected to the X.

Hence, the given statement would show the X-linked dominant form of inheritance sequence.

5 0
3 years ago
A host wants to send a message to another host with the IP address 115.99.80.157. IP does not know the hardware address of the d
Darya [45]

Answer: ARP ( Address Resolution Protocol)

Explanation:

 The address resolution protocol is is one of the type transmission protocol that helps in determining the address of the MAC (Media access control) layer and the IPV4 address.

  • It is basically use for resolving the given IP address by using the hardware and the media access control in the network interface.
  • The main function of the ARP is that it typically used the MAC address for identifying the various types of mode in the network.
  • It is used the ARP format in the form of packet structure for transmitting the message from one place to another in the local network.    

  Therefore, the host is using the address resolution protocol for discovering the MAC address.  

3 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose that, even unrealistically, we are to search a list of 700 million items using Binary Search, Recursive (Algorithm 2.1).
    11·1 answer
  • How to reply to text from unknown number?
    11·1 answer
  • Match each invention with its effects on the age of exploration.
    6·2 answers
  • The user cannot use a computer system without.................... software<br><br>​
    13·2 answers
  • Pig Latin is ______ and fits very naturally in the pipeline paradigm while SQL is instead declarative.
    7·1 answer
  • Briefly explain specialisation?​
    11·1 answer
  • What is the definition of overflow in binary?
    6·1 answer
  • What is a box with dotted border that holds a place for content on a slide called?
    11·1 answer
  • A social media site violates its terms of service by selling information about its users
    7·1 answer
  • Question 12 (5 points)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!