C++ How to dispaly details for students and Create object for student class and input dispaly details

Ads

 
 

Share on Google+Share on Google+

Azim Ajmeri
C++ How to dispaly details for students and Create object for student class and input dispaly details
1 Answer(s)      5 years and 6 months ago
Posted in : Hibernate

1.Create a class called student with following descriptions Data member : Rno - int Name - char[20] Std - int Mark1 int Mark2 - int Mark3 - int Member function Getdata() - To input details for students Putdata() - to dispaly details for students Create object for student class and input dispaly details.

Ads
View Answers

May 8, 2012 at 4:26 PM


The given code defines a class Student which describes two member functions. The function Getdata() accepts the student roll no, name and marks of three subjects from the user and Putdata() display this information.

#include <iostream>
#include <stdio.h>
#include <conio.h>

using namespace std;
class student
{
      private :
             int sno;
             char name[20];
             int m1,m2,m3;
      public :
             void Getdata()
             {
                   cout << "Enter Student No.  "; cin >> sno;
                   cout << "Enter Student Name  "; cin >> name;
                   cout << "Enter Student 3subjects marks  ";
                   cin >> m1 << m2 << m3;
             }
             void Putdata()
             {
                   cout  << "Student number  :" << sno;
                   cout << "Student name      :" << name;
                   cout << "Student marks     :" << m1 << "  " <<m2<<"  "<<m3;
            }
};
void  main()
{
      student s;
      s.Getdata();
      s.Putdata();
      return 0;
}]

Ads









Related Tutorials/Questions & Answers:
C++ quuestion 1
C++ How to dispaly details for students and Create object for student class and input dispaly details   1.Create a class called student... Putdata() - to dispaly details for students Create object for student class
student details
student details  create an application for details of 1st to 5th standard students by using loops and scanner
Advertisements
student details
student details  hi sir/madam i have a doubt in PHP how to insert student details using mysql with php..   Have a look at the following link: PHP Mysql insert
how to develop student details using springs
how to develop student details using springs  how to develop student details using springs
using list iterator create student details - JavaMail
which will describe you how to create Student class and add its properties...using list iterator create student details  write a java program to create student class with particulars like name, rno, marks,etc. and print them
how to dispaly pdf file on browser
how to dispaly pdf file on browser  In my project i have created one pdf file(by pdfwriter) into my local mechine . after that it need to display in browser as a pdf file . but in jsp i can't display by tag can anyone give me
Write a program to get student details and store in a database
Write a program to get student details and store in a database  Write a program to get student details and store in a database
Design a registration.jsp page with input for user registration details
Design a registration.jsp page with input for user registration details  Design a registration.jsp page with input for user registration details like... submitting this details, display the details onto the display.jsp page using
Dispaly Inbox Image - Development process
Dispaly Inbox Image   I want to Display Inbox image when user(Client) send Message to Server in (Windows Application ) VISUAL BASIC.NET 2008, plz Help Me
how to code-updating some details n some details r unchanged
how to code-updating some details n some details r unchanged  i have created a page with empty text boxes,details are.... house... : bloodgroup : my requirement is to update the details of user. and i had written
how to access the details - Java Beginners
how to access the details  how to access the detailsclass E { String name; String no;string place; E(String n,String n,String p) { ... ... .... } public String... no)and retrive all the details of the person which is not given
How to create an input box?
How to create an input box?  How to create an input box
APLIANCE DETAILS
that contains the Appliance class. Now I want to create a class named NewAppliance that stores the details of the newly launched appliances.I used the following syntax to code the NewAppliance class that inherits from the Appliance class
How to extract details from XML? - JSP-Servlet
How to extract details from XML?  I want to extract details from http://service.openkapow.com/palanikumar/airportantigua.rest How can i extract details from this link?Here is my program... Airport
how to get the details of username&password of mysql - JDBC
how to get the details of username&password of mysql  Hi friends, i installed mysql 5.5 on my system successfully,but the thing is i forgotten the username and password .please tell me how to get those details . Thanks
scjp details
scjp details  SCJP fees details abou scjp? What are the best books for preparing to scjp? How many time scjp exam's are conducted for one year
How to display gridview details to labels dynamically?
How to display gridview details to labels dynamically?  I am using SQLDataSource to connect to MySQL. I have a gridview that retrieves information... to display however, it always displays the details of the previously selected id
how to retrive other details with an image - Swing AWT
how to retrive other details with an image  hello I m trying..... followingis my code..plz advice me how to get both values as well as image at a same...("Select visitor_firstname,Type_code, image_data from visiting_details where Ticket
How to create file from input values in Jframe ?
How to create file from input values in Jframe ?  hi i m doing my... an object for it.my java code is public class submit { JFrame frame; JTextArea... the user's academic details and on clicking the submit button,it displays all
customer details
customer details  write a java code to enter n number of persons details(name,address,phone number) in a array list. Also consider exceptional cases like entering integer in name,character in phone number. use try,catch ,throw
How to read user input in C++
How to read user input in C++  How can i get an input from the users in C++?   You can use the standard input "cin" to get the input from user.. For example: int age; cin >> age
Maintaining States of Selected CheckBoxes in Different Pages using dispaly table in struts2
Maintaining States of Selected CheckBoxes in Different Pages using dispaly table in struts2  Hi, I am working in a Struts 2 project where in the jsp... me how to maintain States of Selected CheckBoxes in Different Pages using
how to send email please give me details with code in jsp,servlet
how to send email please give me details with code in jsp,servlet  how to send email please give me details with code in jsp,servlet
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?
HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILE USING JSP?  HELLO SIR, CAN ANYONE HELP ME OUT HOW TO STORE MULTIPLE EMPLOYEE DETAILS TO XML FILES,IF I ENTER 4 EMPLOYEE DETAILS(NAME,ID,SALARY,EMAIL) ALL THE DETAILS OF 4
JDBC: Get Column Details Example
JDBC: Get Column Details Example In this tutorial, we are describing how to get column details of a table using JDBC API. Get Column details...(); // Fetching Column details String sql = "SHOW COLUMNS FROM student"; rs
Can you create an object of an abstract class?
Can you create an object of an abstract class?   Hi, Can you create an object of an abstract class? Thanks
How to create dynamic array in C?
How to create dynamic array in C?  How to create dynamic array in c programming language?   Dynamic Array in C Tutorial
bank details - JSP-Servlet
is first to set the user account details in database, and the to create a login...bank details  hi i just need a coding for bank details... since iam... is did is i created a database for users account details and created a login
How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java
searching inside a file for details
searching inside a file for details  i created a file with name,country,state etc...when i'm searching for the name, i have to get other details like country,state etc...please do help

Ads

 
Advertisement null

Ads