NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

main.cpp

#include <iostream>
#include <string>
#include "oibs.h"



int main() {

int department;
int a= 1;
while(a!=4) {
std::cout<<"nPlease enter the value of your department: n";
std::cout<<"1- Software Engineer";
std::cout<<"2-Psyhcologyn";
std::cout<<"For exit press 4 n";
std::cin>>department;
if(department==1) {
lesson datastru;
datastru.setTitle("Data Structures");
datastru.setCredit(4);
datastru.setCode("Comp217");
std::cout<<"nTitle of lesson is: " <<datastru.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<datastru.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<datastru.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
//Lesson2
lesson objectori;
objectori.setTitle("Object Orianted Programming");
objectori.setCredit(4);
objectori.setCode("Comp218");
std::cout<<"nTitle of lesson is: " <<objectori.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<objectori.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<objectori.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
//Lesson3
lesson algorithm;
algorithm.setTitle("Analysis Of Algorithm");
algorithm.setCredit(3);
algorithm.setCode("Comp335");
std::cout<<"nTitle of lesson is: " <<algorithm.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<algorithm.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<algorithm.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
}else if(department == 2) {
lesson intro;
intro.setTitle("Intro To Psyhcology");
intro.setCredit(5);
intro.setCode("PSYC107");
std::cout<<"nTitle of lesson is: " <<intro.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<intro.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<intro.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
//lesson 2
lesson biol;
biol.setTitle("Biological basis of behavior");
biol.setCredit(3);
biol.setCode("BIOL105");
std::cout<<"nTitle of lesson is: " <<biol.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<biol.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<biol.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
//lesson 3
lesson evol;
evol.setTitle("Evolution Of Psyhcology");
evol.setCredit(6);
evol.setCode("PSYC221");
std::cout<<"nTitle of lesson is: " <<evol.getTitle()<<"n";
std::cout<<"nCredit of lesson is: "<<evol.getCredit()<<"n";
std::cout<<"n Code of lesson is: "<<evol.getCode()<<"n";
for(int i =0; i<30; i++) {
std::cout<<"-";
}
}
else if(department==4) {
a=4;
}
}
return 0;
}


oibs.h

#pragma once
#include "oibs.cpp"
void setTitle(std::string title) {
title = title;
}

std::string getTitle() {
return title;
}

void setCredit(int credit) {
credit = credit;
}

int getCredit() {
return credit;
}

void setCode(std::string code) {
code = code;
}

std::string getCode(){
return code;
}

std::string title;
std::string code;
int credit;

oibs.cpp

#include <iostream>
#include <string>
class lesson {
public:
void setTitle(std::string title) {}
std::string getTitle() {}
void setCredit(int credit) {}
int getCredit() {}
void setCode(std::string code) {}
std::string getCode(){}

std::string title;
std::string code;
int credit;


};
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.