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
Natali5045456 [20]
2 years ago
8

1. Write programming code in C++ for school-based grading system. The program should accept the Subject and the number of studen

ts from a user and store their details in an array of type Student (class). The student class should have: • studName, indexNo, remarks as variables of type string, marks as integer, and grade as char. • A void function called getData which is used to get students’ details (index number, name, and marks). • A void function called calculate which will work on the marks entered for a student and give the corresponding grade and remarks as give below. Marks Grade Remarks 70 – 100 A Excellent 60 – 69 B Very Good 50 – 59 C Pass 0 – 49 F Fail • Should be able to display the results for all students (index number, name, marks, grade, remarks). 2. Draw a flowchart for the calculate function above
Computers and Technology
1 answer:
satela [25.4K]2 years ago
7 0

In this program, I am using the school-based grading system and the program should accept the subject and the number of students.

Program approach:-

  • Using the necessary header file.
  • Using the standard I/O namespace function.
  • Define the main function.
  • Declare the variable.
  • Display enter obtain marks in 5 subjects.
  • Return the value.

Program:-

//header file

#include<iostream>

//using namespace

using namespace std;

//main method

int main()

{

//declare variable

  int j;

  float mark, sum=0, a;

//display enter obtain marks in 5 subjects

  cout<<"Enter Marks obtained in 5 Subjects: ";

  for(j=0; j<5; j++)

  {

      cin>>mark;

      sum = sum+mark;

  }

  a = sum/5;

//display grade

  cout<<"\nGrade = ";

  if(a>=91 && a<=100)

//display a1

      cout<<"a1";

  else if(a>=81 && a<91)

//display a2

      cout<<"a2";

  else if(a>=71 && a<81)

      cout<<"b1";

  else if(a>=61 && a<71)

      cout<<"b2";

  else if(a>=51 && a<61)

//display c1

      cout<<"c1";

  else if(a>=41 && a<51)

//display c2

      cout<<"c2";

  else if(a>=33 && a<41)

//display d

      cout<<"d";

  else if(a>=21 && a<33)

//display e1

      cout<<"e1";

  else if(a>=0 && a<21)

//display e2

      cout<<"e2";

  else

//display invalid

      cout<<"Invalid!";

  cout<<endl;

//return the value

  return 0;

}

Learn more grading system

brainly.com/question/24298916

You might be interested in
Write a recursive method named binarySearch that accepts a sorted array of integers and an integer target value and uses a recur
djyliett [7]

Answer:

10

-1

Process finished with exit code 0

Explanation: see code bellow

public class BinarySearchRecursive {

   public static int binarySearch(int[] a, int key) {

       return binarySearchRecursiveHelper(a, key, 0, a.length - 1);

   }

   public static int binarySearchRecursiveHelper(int[] arr, int target, int start, int end) {

       if (start > end) {

           return -1;

       }

       int mid = (start + end) / 2;

       if (arr[mid] == target) {

           return mid;

       } else if (target < arr[mid]) {

           return binarySearchRecursiveHelper(arr, target, start, mid - 1);

       } else {

           return binarySearchRecursiveHelper(arr, target, mid + 1, end);

       }

   }

   public static void main(String[] args) {

       int[] a = {-4, 2, 7, 10, 15, 20, 22, 25, 30, 36, 42, 50, 56, 68, 85, 92, 103};

       int index = binarySearch(a, 42);   // 10

       System.out.println(index);

       index = binarySearch(a, 66);   // -1

       System.out.println(index);

   }

}

6 0
2 years ago
Which three options below describe typographic hierarchy?
Korvikt [17]

The three options that describe the typographic hierarchy are given below:

  • The importance of information is shown through the text.
  • The presentation of the text in terms of structure.
  • The placement of the text defines its flow and hierarchy.

Thus, the correct options are A, B, and C.

<h3>What is Typographic hierarchy?</h3>

Typographic hierarchy may be characterized as an approach that utilizes typography: the size, font, and layout of distinct text components to produce a hierarchical division that can authenticate users where to look for specific information.

The purpose of using this methodology is to focus on the main points of the article accordingly. It increases the sense of understanding of the readers with focus.

Therefore, it is well described above.

To learn more about Typographic hierarchy, refer to the link:

brainly.com/question/12076206

#SPJ1

3 0
1 year ago
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
topjm [15]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

8 0
3 years ago
Suppose you have a 16-bit machine with a page size of 16B. Assume that any unsigned 16-bit integer can be a memory address. Also
irinina [24]

Answer:

2^11

Explanation:

Physical Memory Size = 32 KB = 32 x 2^10 B

Virtual Address space = 216 B

Page size is always equal to frame size.

Page size = 16 B. Therefore, Frame size = 16 B

If there is a restriction, the number of bits is calculated like this:  

number of page entries = 2^[log2(physical memory size) - log2(n bit machine)]

where

physical memory size = 32KB  which is the restriction

n bit machine = frame size = 16

Hence, we have page entries = 2^[log2(32*2^10) - log2(16)] = 2ˆ[15 - 4 ] = 2ˆ11

7 0
3 years ago
For the block of 400 addresses, what is the length of the net id? njit
rewona [7]
23 bits would leave room for 512 node numbers.
3 0
2 years ago
Other questions:
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • "You are on a service call to fix a customer’s printer when she asks you to install a software package. The software is on a per
    13·1 answer
  • Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho
    9·1 answer
  • Machine-to-machine (M2M) technology enables sensor-embedded products to share reliable real-time data ________.Select one:a. ove
    14·1 answer
  • Which magazine introduced the first microcomputer kit for the mits altair in its january 1975 issue?
    8·1 answer
  • Hey mates.........needed asap 1.) Mention and explain four (4) ICT gadgets,
    9·2 answers
  • which of the following devices and and receive information from other device? a parallel port B serial port C video port d both
    8·1 answer
  • Mention any
    14·1 answer
  • Explain approaches of AI​
    12·2 answers
  • In your own opinion how comes the surface grinding machine is called a highly accurate machine tool?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!