Write a C++ program that stores information (name, gender, birthday, phone number, civil status, religion, college course, nationality) of a student in a structure and displays it on the screen.

Answers

Answer 1
#include
class Student
{
public:
Student(std::string name, std::string gender, std::string phonenumber, std::string civilstatus, std::string religion, std::string course, std::string nationality)
{
Student::name = name;
Student::gender = gender;
Student::phoneNumber = phonenumber;
Student::civilStatus = civilstatus;
Student::religion = religion;
Student::collegeCourse = course;
Student::nationality = nationality;
}
void displayOnScreen()
{
std::cout << "Name: " << name << std::endl
<< std::cout << "Gender: " << gender << std::endl
<< std::cout << "Phone Number: " << phoneNumber << std::endl
<< std::cout << "Civil Status: " << civilStatus << std::endl
<< std::cout << "Religion: " << religion << std::endl
<< std::cout << "College Course: " << collegeCourse << std::endl
<< std::cout << "Nationality: " << nationality << std::endl;
}
std::string name, gender, phoneNumber, civilStatus, religion, collegeCourse, nationality;
};

Related Questions

What is the computer virus?

Answers

a piece of code which is capable of copying itself and typically has a detrimental effect, such as corrupting the system or destroying data.

computer virus can be defined as a malicious program that self replicates by copying itself to another program, in other words, the computer virus spreads by itself into order executable code or documents.

Computer Science (IT). My lecture was asking to do the final year project but i still haven't got the title. Does anyone can give me good recommendation of what the project i should do for my final year project?

Answers

Answer:

Hi, of course.

Project ideas:

Household temperature monitoring  Internet of things

Registration of people entering a shopping center during peak hours  with Internet of things

Smart houses with Internet of things

Explanation:

At the moment I am working on projects related to Internet of things and it is a fantastic world in which to enter, try searching  Internet of things fundamentals on yt and you soak up the subject, then you can start looking on the first hello world in arduino with Internet of things.

In this moment I'm working on a gps tracker for a public buses and it's not too hard as it's sound.

I hope it's help you

Choose a final year project that interests you and showcases your skills, such as machine learning, web development, mobile apps, cybersecurity, or IoT. Engage with faculty for guidance and consider past coursework to generate ideas.

Here are some recommended project ideas:

Machine Learning Algorithms: Develop a project that uses machine learning algorithms to solve a real-world problem, such as predicting stock market trends or diagnosing medical conditions based on patient data.Web Development: Create a comprehensive web application, perhaps an e-commerce site or a social networking platform, focusing on both front-end and back-end development.Mobile Application Development: Build a useful mobile app, such as a fitness tracker, budgeting tool, or educational game. Include features that integrate with various APIs for an enhanced user experience.Cybersecurity: Design a system for detecting and preventing cybersecurity threats, which could involve creating a new type of firewall, intrusion detection system, or a secure communication protocol.Internet of Things (IoT): Develop an IoT solution, like a smart home automation system or an environment monitoring network, utilizing sensors and cloud computing for data analysis and real-time monitoring.

When choosing a project, consider what interests you the most and what areas you want to become more proficient in. Engage with faculty members who have expertise in your area of interest for mentorship and guidance. Additionally, reflect on past coursework that you found particularly engaging or challenging, as it might spark project ideas.

Write a conditional expression that assign the value 0 to a credits variable if it is less than 0; otherwise the value of the credits variable remains unchanged.

Answers

Answer:

credits = (credits < 0) ? 0 : credits;

Explanation:

This is the ternary conditional operator.

Answer:

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Explanation:

I am going to write a C function for this.

The input is your credit value, and it has just a conditional to verify if it is not negative.

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

: Differentiate between serial and parallel data transfer withat least one example of each from computer sciencedomain.

Answers

Answer:

In serial communication transfers one bit of data at a time, while parallel communication transfers many bits of data at the same time. Serial communication transmits the data bits sequentially, while parallel communication transmits data bits simultaneously, allowing greater amounts of data to be transferred.

-Serial communication is the one used to communicate the Arduino with the Computer through the USB cable.

-An example of a parallel port is the printer port. The Parallel Port was only created and used in the printers interface and the computers.

Explanation:

In serial communication, each bit is sent by its own clock flank where conditions are defined after each byte, if it is synchronous or asynchronous. In parallel communication there is only one single clock flank where the information is sent where it is an advantage to use it where there are several input or output data.

I hope it's help you.

The ____ in a binary tree is the number of branches on the path from the root to the node.

A.
size of a node

B.
level of a node

C.
depth of a node

Answers

if i remember correctly from class, it’s c. the depth of a node

A jeweler designing a pin has decided to use five stones chosen from diamonds, rubies, and emeralds. In how many ways can the stones be selected?

Answers

Answer:

3,125 different possible ways

Explanation:

Great question, hopefully i can shed some light on the situation. There are a total of 5 stones. One by one they are randomly picked out of the bag. We need to find how many possible combinations there are for picking the stones out of the bag. We can solve this by raising the amount of stones in the bag to its own power like so,

[tex]5^{5} =  3,125[/tex]

So now we can see there are 3,125 different possible ways of selecting the stones.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

When askingfor a raise, which one among the following is important toremember?

a- Effort is to berewarded

b- Non-cash benefits may beof value if a raise is not feasible

c- The length of employmentis a great bargaining tool in asking for araise

d- Emotional appeals canhelp in getting a positive response to therequest

Answers

Answer:

a-Effort is to be rewarded

Explanation:

When you ask for a raise in an organization,the one of the most important thing is Effort.There is a reason for everything in organization,if you are asking to raise your income organization will ask you on which basis you are asking.If you put extra hours than before or you gain some skill which is useful for the organization,so while asking for raise you should know the effort that you put in because effort is most important factor for a raise.

In formal organizations, Non cash benefits are not there so there is no purpose for asking it.

Employment does not matter for the peer in asking for a raise,sometimes it is used by small organizations but it is informal,the one should focus more on effort rather than the employment.

Emotional appeals may help in informal organization,never in formal organization.It only imprints negative image on peer's mind,if you want to have a raise you should focus on Effort.    

HTML uses formatting codes called ____, which specify how the text and visual elements on a Web page will be displayed in a Web browser.
Answer
entities
schema
tags
blocks

Answers

Answer:

tags

Explanation:

HTML tags provide the formatting information for the web page. Web Browsers like internet explorer, firefox, google chrome interpret these tags and render the page accordingly. For example: content enclosed within <i> and </i> will be rendered in italicized format.Similarly content enclosed within <b> and </b> will be rendered in bold.

Forwarded events can only be recorded when systems ADMINISTRATORS have de-established an event subscription. TRUE or FALSE

Answers

Answer:

True

Explanation:

Forwarded events can only be recorded when systems administrators have de-established an event subscription.

What are the advantage of transistors over vacuum tubes?

Answers

Answer:

Transistors are comparatively cheaper and consume less power as compared to vacuum tubes.

Explanation:

Transistor when compared to vacuum tubes perform much faster processing, are small and lightweight which enables it to integrate them into circuits.

They also show a high amplification factor than vacuum tubes.

True / False
The exponent in floating point is stored as a biased value.

Answers

Answer:

True

Explanation:

The bias value present in a floating point number deals with the positiveness and negativeness of the exponent part for a floating point number.  The bias value for a floating point number is 127. It means that 127 is always needed to be added to the exponent part of any floating point number.

In a single precision floating point number, we need 8 bits to store the exponent. Rather than storing it as a signed two's complement number, it is easier to simply add 127 to the exponent (because the lowest value that can be in 8 bit signed is -127) and simply store it as an unsigned number. If the stored value is bigger than the bias then it would mean the value of the exponent is positive otherwise it is negative, but if they are equal then it is 0.

______ are used to store all the data in a database.

A. Forms
B. Tables
C. Fields
D. Queries

Answers

Answer:

C. Fields

Explanation:

Fields are used to store all the data in a database.

Fields are used to store all the data in a database. The correct option is C.

What is a database?

A database is a collection of data that has been organized to make it simple to manage and update. Data records or files containing information, including as sales transactions, customer information, financial data, and product information, are often aggregated and stored in computer databases.

A database field is a collection of identical data values in a table. It is also known as an attribute or a column. Most databases also permit complicated data storage in fields, including images, whole files, and even movie clips. A lot does not necessarily have simple text values just because it supports the same data type.

Therefore, the correct option is C. Fields.


To learn more about the database, refer to the link:

https://brainly.com/question/29412324

#SPJ6

Given an array A of n + m elements. It is know that the first n elements in A are sorted and the last m elements in A are unsorted. Suggest an algorithm (only pseudo code) to sort A in O(mlogm +n) worst case running time complexity. Justify.

Answers

Answer:

Explanation:

We can divide array A into two arrays B , C

B would contain the sorted n elements.

C would contain the unsorted m elements.

Now we can sort C using merge sort with worst time complexity mlogm.

When you will have array C sorted you can concatenate with B and put it back in A.

define the role of cache memory in computers.

Answers

Answer:

Cache memory is relatively small in size as compared to the main memory. The cache memory stores programs, variables which are frequently used by the processor.

Explanation:

The cache memory is placed very close to the processor so that the programs and variables can be accessed very quickly as and when required by the processor. The size of the cache memory is small and also cost more. There is also a secondary cache in many systems which enables to store more programs which cannot be store in the primary cache.

In a database, data is stored in spreadsheets which have rows and columns.

A.

True

B.

False

Answers

The answer is A. True.
Final answer:

A spreadsheet is a collection of data organized into rows and columns. However, it has limitations compared to relational databases in terms of data organization and accessibility.

Explanation:

A spreadsheet is a collection of data that is organized into rows and columns. Each column represents a field or attribute, while each row represents a record or data instance. While spreadsheets can function as a type of database, they have limitations in terms of data organization and accessibility compared to relational databases which use a tabular structure and allow for easier reorganization and access of data.

Write a recipe that stores the sum of the numbers 12 and 33 in a variable named sum. Have your recipe display the value stored in sum.

Answers

Answer:

#include<iostream>

using namespace std;

int main(){

   int sum = 12+33;

   cout<<"The sum is: "<<sum<<endl;

}

Explanation:

First include the library iostream in c++ program for input/output.

Then, create the main function and declare the variable sum as integer type and store the sum of two given values.

After that, display the result store in the sum variable on the screen by using the instruction cout.

Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do).

Answers

// c++ code to read the recieved calls

cout<< " Enter the calls recieved :";

cin>>callsRecieved;

cout<< " Enter operator on call : ";

cin>>operatorsOnCall;

// calculating the call per operator

calls_per_operator = callsRecieved/operatorsOnCall;

// printing the vaule.

cout<<" Calls recieved per operator are : " << calls_per_operator <<endl;

Final answer:

To find the number of calls received per operator, read inputs for callsReceived and operatorsOnCall, then divide callsReceived by operatorsOnCall using integer division and print the result.

Explanation:

To calculate the number of calls received per operator, you will first need to read values into the variables callsReceived and operatorsOnCall. You can do this using an input method appropriate for the programming language you're using (e.g., scanf in C, cin in C++, or input() in Python). Once you have these values, you perform the division of callsReceived by operatorsOnCall and print the result. Here is an example code snippet in Python:

# Read the number of calls received and the number of operators on call
callsReceived = int(input('Enter the number of calls received: '))
operatorsOnCall = int(input('Enter the number of operators on call: '))

# Calculate the calls per operator with integer division
callsPerOperator = callsReceived // operatorsOnCall

# Print the result
print('The number of calls received per operator is:', callsPerOperator)

Note that integer division with truncation is used (// in Python) to get an integer result.

Define the following variables (in a new file and a new main() function):
• Integer value a and b
• Pointer variable p and q (pointers to integer values)
• Set the value of a to 5 and value of b to 7
• Set p to point to a and q to point to b (in other words assign the address of variables to pointers)

Answers

Answer:

#include<stdio.h>

int main()//driver function

{

int a=5;//initializing variable a

int b=7;//initializing variable b

int *p,*q;//declaring pointers p and q

p=&a;//assigning the address of a to p

q=&b;//assigning the address of b to q

printf("value of a is %d\n",a);

printf("value of b is %d\n",b);

printf("value of pointer p is %d\n",*p);

printf("value of pointer q is %d\n",*q);  

printf("address of a is %d\n",&a);

printf("address of b is %d\n",&b);

return 0;

}

Output

value of a is 5

value of b is 7

value of pointer p is 5

value of pointer q is 7

address of a is -783856608

address of b is -783856604

The ____ method takes a String argument and returns its double value.

a.
parseString()

b.
returnDouble()

c.
parseInt()

d.
parseDouble()

Answers

Answer:

d

Explanation:

In java you can use pareDouble(string str) to convert the string into double.

for example if you have string like this.

string str  = [tex]"16.45" ;[/tex]

then you can use

double mydouble = Double.parseDouble(str);

print(mydouble); //it will print out 16.45

but if the string would not be able to be parsed into double then you will get an error.

Give brief comparison of Broadcast, Unicastand Multicast?

Answers

Answer:

In broadcast the message is transmitted from one to all , in uni cast we have one to one transmission and in multicast we have transmission from one to many.

Explanation:

If we take the example of a simple messaging application it will be clear. If a message is exchanged between one person to another, then it is uni casting. If a person sends a message to all the persons in his contact list then it is broadcasting and  if a person sends messages to select persons in his contact list then it is multi casting. In multi casting management of the group is required regarding who can receive messages which is not required in broadcasting.

1) All the elements of an array in Java MUST conform to the same data type.

a) True
b) False

Answers

Answer:

TRUE

Explanation:

The array is allow to store the multiple values but with same data type.

It cannot store element with different data type.

For example:

int array[] = {1, 'b', 8.7, 9, 'z'}

the above is wrong way to declare the array.

the correct ways is:

int array[] = {1,2,3,4};

float array[] = {1.2, 3.4, 9.6};

we can store only same data type element in multiple tiles.

What are fields? Instance variables? object? methods?

Answers

Answer:

Explained

Explanation:

Fields: Fields represent data and should be a noun. It should begin with a lower case letter.

Instance variable: it is a variable defined in class but outside the constructor and the method. instance variables are created when an object is instantiated.

Object: An object is the basic unit of object oriented programming language.and represents the real life entities. An object consists of state behavior and properties.

Method: Method in a collection of statements that perform some specific task and return the result to the caller.

Non proprietary standard is also termed as____________

a. De facto standard

b. Le facto standard

c. Pre facto standard

d. Non facto standard

Answers

Answer: Option A) De facto standard

Non proprietary standard is also termed as de facto standard.

Explanation:  Non proprietary standard is also termed as de facto as when the proprietary standard such as window are widely used, then it becomes  de facto standard. When de facto standard is referring in terms of computers, it is an accepted application, design or language standard that is used in industry but not officially recognized.  

An example of de facto standard is paper clip ion used in e-mail to represent an attachment.  

What is one property of a good hash code?

Answers

Answer:- Major property of a good hash code is that objects which are equal should return the same hash code .

Explanation: Hash codes is a numeric value which  is used for identify a object while a equality testing .Hash code can occupy the value of any length and then returns a fixed length value. The value of hash codes are variable.

If two objects are equal then by the method of equal(object) if the hashcode() function is called on both the objects , they produce the same value.

briefly describe the software quality dilemma in your own words

Answers

Answer:

 software quality dilemma is a situation where there is confusion regarding what should we prioritize : a good quality work or a fast paced work. In software development , many a times there will be deadlines to achieve, in such cases software quality dilemma is bound to occur. A developer would have to choose between writing and optimized and well commented code or just get the job done without proper optimized or reviews. In same lines, many companies have to decide between regular reviews and expert opinions of a product for good software quality or bypass them to meet budgets and deadlines.

In short, a software quality dilemma means a situation of production of software system that has terrible quality which causes low sales.

A software quality dilemma refers to a situation where there is a confusion regarding what should we prioritize whether a good quality work or a fast paced work with little quality,

In conclusion, in a software development, there are usually deadlines to achieve a software creation and this is one of the cause of software quality dilemma.

Read more about quality dilemma

brainly.com/question/13171394

Write a Java program that calculates and prints the monthly pay check for an employee. The net pay is calculated after taking the following deductions:

Federal Income Tax: 15%
State Tax: 3.5%
Social Security Tax: 5.75%
Medicare/Medicaid Tax: 2.75%
Pension Plan: 5%
Health Insurance: $75.00

Answers

Final answer:

A Java program can calculate an employee's net pay by deducting federal, state, Social Security, Medicare/Medicaid taxes, pension plan contributions, and health insurance costs from the gross pay. The net pay is then output as the amount the employee would receive in their paycheck.

Explanation:

To calculate the net pay for an employee after deductions, we need to write a Java program that considers the following deductions: Federal Income Tax at 15%, State Tax at 3.5%, Social Security Tax at 5.75%, Medicare/Medicaid Tax at 2.75%, a pension plan deduction at 5%, and a fixed amount for health insurance at $75.00.

Here is a simple example of how this Java program might look:

public class PaycheckCalculator {
   public static void main(String[] args) {
       double grossPay = 5000; // Example gross pay
       double federalTax = grossPay * 0.15;
       double stateTax = grossPay * 0.035;
       double socialSecurityTax = grossPay * 0.0575;
       double medicareTax = grossPay * 0.0275;
       double pensionPlan = grossPay * 0.05;
       double healthInsurance = 75;

       double netPay = grossPay - (federalTax + stateTax + socialSecurityTax + medicareTax + pensionPlan + healthInsurance);

       System.out.println("Net pay: $" + netPay);
   }
}

This program calculates each of the deductions based on the gross pay, subtracts them from the gross pay, and prints out the resulting net pay.

An objective function in linearprogramming is a(n):

decisionvariable.
environmentvariable.
resultvariable.
independentvariable.
constant.

Answers

Answer: An objective function in linear programming is a decision variable.

Explanation: An objective function is a function which has the target towards the model whether it should be maximized or minimized according to the relation between the  variables present in the function. There are set of variables which are responsible for the controlling of objective function that is known as decision variables.

types ofsecurity(hardware-software-both)??

Answers

Answer:

There are two types of security:

Hardware security: A hardware security is defined as, it is a physical computing device which help in managing the digital path for strong authentication and provides processing the module. It is used to monitor the traffic and used in scanning the system.

Software security: Software security is a type of software which helps in secure a network and computer devices. It manages access control and provides the data protection of the system and defend from other system security risks.  

Why cli and sti instructions are used during hooking aninterrupt?

Answers

Answer: Cli(Clear interrupt flag ) and sti(set interrupt flag) instructions are used for clearing the flag and setting or enabling a flag respectively while hooking an interrupt.

Explanation: During the action of hooking an interrupt,there are certain interruptions while changing of real time interrupt vector and to avoid those interruptions two instructions are used that is cli ans sli. Cli is present for the clearing or disabling the interrupt flag and sti is used for setting or enabling a interrupt flag.

write a program that convert binary number to decimal. I mean the input should be binary number and the output decimal number!!.

Answers

Answer:

#include<iostream>

#include<math.h>

using namespace std;

//main function

int main(){

   //initialization

   long b1;

   int d1=0,count_pos=0;

//display the message

   cout<<"Enter the binary number: ";

   cin>>b1;  //store the value

   //loop for take the digit one by one

   while(b1!=0){

       int rem1 = b1%10;

       d1 = d1 + rem1*pow(2,count_pos);

       count_pos++;

       b1 = b1/10;

   }

   //display the output

   cout<<"The decimal number is: "<<d1<<endl;

}

Explanation:

Create the main function and initialize the variables. Then, display the message on the screen by using the instruction cout and then, store the input enter by the user into the variable. Here, the variable declares with type 'long' because of the size of the input.

After that, we take a while loop for splitting the binary number into the digits and then we can do the operation.

Let's understand how you can convert binary to decimal with an example:

let the binary number is 1001:

decimal number is [tex][tex]1*2^{3}+0*2^{2}+0*2^{1}+1*2^{0}=9[/tex][/tex]

we put the same algorithms in the code. split the number into digit and then multiply with n raised to the power of 2 here, n is the position of digit from left to right.

NOTE: Position starts from zero.

and then, add the values. this process continues until the number is not zero.

After that, display the output on the screen.

Other Questions
1.You want to find if TCP/IP Services are working properly on your Computer, you would use which command? a.PING LOCALHOST b.IPCONFIG /STATUS c.NETSTAT LOOPBACK Which statement is true about lines a and b?They are parallel lines.They are perpendicular lines.They are skew lines.They will intersect. What does peristalsis accomplish in the small intestine? A rocket takes off from Earth and reaches a speed of 105 m/s in 18.0 s. If the exhaust speed is 1,200 m/sand the mass of fuel burned is 110 kg, what was the initial mass (in kg, including the initial fuel) of the rocket? Which process does the plant need energy to perform? A. Release of oxygen into the atmosphere B. Transpiration of water C. Absorbing water into the root hairs D. Pulling nutrients into the root hairs 4,7928 show your work (1 point) Suppose that for two random variables X and Y the joint density function is f(x,y)=6xex(y+6), for x>0 and y>0. Find each of the following. (a) fX|Y(x,y)= (b) fY|X(x,y)= PLEASE ANSWER 9 and 10GEOMETRY SOLVING FOR MISSING ANGLE An electrochemical cell based on the following reaction has a standard cell voltage (Ecell) of 0.48 V: Sn(s) + Cu2+(aq) Sn2+(aq) + Cu(s) What is the standard reduction potential of tin(II)? (E(Cu2+/Cu) = 0.34 V) A potter's wheel of radius 11 cm starts from rest and rotates with constant angular accel- eration until at the end of 35 s it is moving with angular velocity of 19 rad/s. What is the angular acceleration? Answer in units of rad/s2. Write a C++ program to exchange values of two variables using function exchange(). 3) Find the length of a rectangular lot with a perimeter of 92 m if the length is 8 m more thanthe width. What traits did West African societies share? Be specific and explain in detail. Determine the area and perimeter of figure described: square with sides of length 9mm How does emulsification benefit digestion? Write a class named Add that has the following data members, constructor, and methods:Data Members:private int row; // The number of rows for the addition table.private int column; // The number of columns for the addition table.Constructor:// Sets the values of the above data members.public Add ( )Methods: In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital signal.a) True b) False If f(x) = 2x - 6 and g(x) = x^3, what is (gf)(6)?Enter the correct answer. How does Cathy and Hareton's relationship differ from Catherine and Heathcliff's relationship? A. Cathy and Hareton marry only for money and status B. Cathy and Hareton don't truly love each other C. Cathy and Hareton are able to work through their differences D. Cathy and Hareton are more vicious during their fights When stressed what is the purpose of the reaction of quickened breath