CS201 – Introduction to Programming Assignment No. 3  Due Date: July 26, 2018

Get help with
Phd, Masters Thesis & Mcs Final Project
MBA Final Project
Cs619,Fin619,Mgt619,Bnk619,Hrm619,Mkt619
WhatsApp: 0092-3125718857
Skype: trust_aware
Email: projecthelp77@gmail.com
Click here to Join Our Facebook Page
Click here to Join Our YouTube Channel!

CS201 – Introduction to Programming Assignment No. 3  Due Date: July 26, 2018

Get Unique paid solution for this assignment. Cost 1000 rupees. Mail on projecthelp77@gmail.com

Assignment No.  3
Semester: Spring 2018

CS201 – Introduction to Programming

 

Total Marks: 20

 

Due Date:

July 26, 2018

 

Instructions

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

 

o        Assignment is submitted after due date.

o        Submitted assignment does not open or file is corrupt.

o        Assignment is copied (From internet/ from other students).

 

Software allowed to develop Assignment

–          Dev C++

 

Objectives:

Student will be able to analyze and implement the concepts of:

  • Classes and Objects
  • Constructors in classes
  • Getter and Setter functions in classes

 

Assignment Submission Instructions

You have to submit only.cpp file on the Assignments interface of CS201 at VULMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.

 

Assignment  
 

Write a C++ program that will create a class named Laptop.

 

This class will have 4 data members

  1. brand
  2. processor
  3. ram
  4. hardDrive

 

Also write getter and setter functions for each data member of the class. For example:

void setbrand(char[]);

void setCpu(char[]);

…………….etc

 

int getRam();

int getHD();

 

………………… etc

 

You are required to write a default and a parameterized constructor for this class.

 

In the default constructor, you will initialize all the data members with default values. The message “Default constructor called…” should be displayed whenever an object is created using default constructor.

 

In parameterized constructor, you will initialize all the data members with the values passed to it as arguments. You are required to use setter functions inside parameterized constructor to initialize the data members. The message “Parameterized constructor called…” should be displayed whenever an object is created with parameterized constructor.

 

In main() function, create 2 objects (1 using default and 1 using parameterized constructor) and display the values of data members of both objects using getter functions.

 

Sample output for the program is shown below:

 

 

 

Sample Output:

 

 

 

 

 

 

 

 

 

 

 

NOTE:

You must use setter functions inside the parameterized constructor for initialization of the data members with the values passed by arguments. Also you have to use getter functions in the main() to show the values of data members. Marks will be deducted if any of these requirements is not fulfilled.

 

 

 

Deadline:

Your assignment must be uploaded on or before July 26, 2018. We will not accept your solution through email after the due date.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

× WhatsApp Us