Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include using namespace std; class student { private: string last_name; string first_name; int id_number; public // error student(string l, string f) { last_name = l;

image text in transcribed

#include using namespace std;

class student { private: string last_name; string first_name; int id_number; public // error student(string l, string f) { last_name = l; first_name = f; } void setID(int id) { id_number = id; } void print() { cout

int main() { student first("Smith", "Bob"); first.id_number = 185439; // error student second("White", "Jane"); second.setID(438295); first.print(); second.print; // error }

You are given some code that creates and uses a c ass to make objects. This code contains several s tax e o s To make your ob a errors your code should compile and run. There is no input to the progran, so there is only a single test case and single sample run. ttle easier,lve indicated each line that contains as r tax enron h a comment that says " or Once you x the Sample run: Bob Smith ID: 185439 Jane khite ID: 438295 YOUR ANSWER We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour For help on how to read input and write output in C+4, click here. l Br more about handling STOIN and STDOUT in other languages Draft saved 01:13 pm Original Code C++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions