0% found this document useful (0 votes)
31 views

Lms Code Source File

C++ Project code

Uploaded by

Maryam Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Lms Code Source File

C++ Project code

Uploaded by

Maryam Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

PF Final Project

Group Members:
M. Rizwan: (B-28741)
Maryam Malik(B-28247)

Submitted To:
 Sir Wasif Abid
 Mam Mudassira

LMS Code:

#include<iostream>

#include<string>

#include<cmath>

using namespace std;

void cources(){

cout<<" *********"<<endl;

cout<<" COURSES "<<endl;

cout<<" *********"<<endl<<endl;

cout<<"1. Programming Fundamentals"<<endl;


cout<<"2. Web programming with HTML & CSS"<<endl;

cout<<"3. Interactive web Design with JAVASCRIPT"<<endl;

cout<<"4. React & Bootstrap"<<endl;+

cout<<"5. UI & UX Designing"<<endl;

void categories(){

cout<<endl;

cout<<"1. Attendance"<<endl;

cout<<"2. Quiz"<<endl;

cout<<"3. Transcript"<<endl;

void attendance(){

int d1;

int d2;

int d3;

int d4;

int d5;

int d6;

int d7;

int d8;

int d9;

int d10;

cout<<" ************"<<endl;

cout<<" Attendance "<<endl;

cout<<" ************"<<endl<<endl;

cout<<"Day 1"<<endl;

cout<<"Mark Attendance : ";

cin>>d1;

cout<<endl;
if(d1==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1/1)*100<<"%";

cout<<endl;

cout<<"Day 2"<<endl;

cout<<"Mark Attendance : ";

cin>>d2;

cout<<endl;

if(d2==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2)*100/2<<"%";

cout<<endl;

cout<<"Day 3"<<endl;

cout<<"Mark Attendance : ";

cin>>d3;

cout<<endl;

if(d3==1){
cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3)*100/3<<"%";

cout<<endl;

cout<<"Day 4"<<endl;

cout<<"Mark Attendance : ";

cin>>d4;

cout<<endl;

if(d4==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4)*100/4<<"%";

cout<<endl;

cout<<"Day 5"<<endl;

cout<<"Mark Attendance : ";

cin>>d5;

cout<<endl;

if(d5==1){

cout<<"Present";
cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5)*100/5<<"%";

cout<<endl;

cout<<"Day 6"<<endl;

cout<<"Mark Attendance : ";

cin>>d6;

cout<<endl;

if(d6==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5+d6)*100/6<<"%";

cout<<endl;

cout<<"Day 7"<<endl;

cout<<"Mark Attendance : ";

cin>>d7;

cout<<endl;

if(d7==1){

cout<<"Present";

cout<<" percentage : ";


}

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5+d6+d7)*100/7<<"%";

cout<<endl;

cout<<"Day 8"<<endl;

cout<<"Mark Attendance : ";

cin>>d8;

cout<<endl;

if(d8==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5+d6+d7+d8)*100/8<<"%";

cout<<endl;

cout<<"Day 9"<<endl;

cout<<"Mark Attendance : ";

cin>>d9;

cout<<endl;

if(d9==1){

cout<<"Present";

cout<<" percentage : ";

}
else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5+d6+d7+d8+d9)*100/9<<"%";

cout<<endl;

cout<<"Day 10"<<endl;

cout<<"Mark Attendance : ";

cin>>d10;

cout<<endl;

if(d10==1){

cout<<"Present";

cout<<" percentage : ";

else{

cout<<"Absent";

cout<<" Percentage : ";

cout<<(d1+d2+d3+d4+d5+d6+d7+d8+d9+d10)*100/10<<"%";

void transcript(){

cout<<" ************************"<<endl;

cout<<" Administrator Enteries "<<endl;

cout<<" ************************"<<endl<<endl;

int mid;

int final;

int attendance;

int quiz;
int assignment;

int project;

int tm;

tm=0;

cout<<"1. Enter Marks Mids : ";

cin>>mid;

if(mid>20){

cout<<"Invalid Entry";

tm=tm+mid;

cout<<endl;

cout<<"1. Enter Marks Finals : ";

cin>>final;

if(final>35){

cout<<"Invalid Entry";

tm=tm+final;

cout<<endl;

cout<<"1. Enter Marks Attendance : ";

cin>>attendance;

if(attendance>5){

cout<<"Invalid Entry";

tm=tm+attendance;

cout<<endl;

cout<<"1. Enter Marks Quizzes : ";

cin>>quiz;

if(quiz>10){

cout<<"Invalid Entry";
}

tm=tm+quiz;

cout<<endl;

cout<<"1. Enter Marks Assignment : ";

cin>>assignment;

if(assignment>10){

cout<<"Invalid Entry";

tm=tm+assignment;

cout<<endl;

cout<<"1. Enter Marks Project : ";

cin>>project;

if(project>20){

cout<<"Invalid Entry";

tm=tm+project;

cout<<endl;

cout<<" ***************"<<endl;

cout<<" Student Marks "<<endl;

cout<<" ***************"<<endl<<endl;

cout<<"Total Marks : "<<tm<<"/100"<<endl;

cout<<"Marks Percentage : "<<tm<<"%"<<endl;

if(tm<=100&&tm>=90){

cout<<"Your External Grade is : A+";

else if(tm<=89&&tm>=80){

cout<<"Your External Grade is : A";

else if(tm<=79&&tm>=70){
cout<<"Your External Grade is : B";

else if(tm<=69&&tm>=60){

cout<<"Your External Grade is : C";

else if(tm<=59&&tm>=50){

cout<<"Your External Grade is : D";

else{

cout<<"Your External Grade is : F";

char quiz1(){

char q1;

char q2;

char q3;

char q4;

char q5;

int tq;

tq=0;

cout<<" ******"<<endl;

cout<<" Quiz "<<endl;

cout<<" ******"<<endl<<endl;

cout<<"What does the '++' operator do in C++?";

cout<<endl<<"a) Decrements the value of a variable by 1";

cout<<endl<<"b) Increments the value of a variable by 1";

cout<<endl<<"c) Multiplies the value of a variable by 2";

cout<<endl<<"d) Divides the value of a variable by 2";

cout<<endl<<endl;
cout<<"Enter Your Answer : ";

cin>>q1;

if(q1=='b'||q1=='B'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which of the following is used to allocate memory for a variable in C++?";

cout<<endl<<"a) malloc()";

cout<<endl<<"b) alloc()";

cout<<endl<<"c) new";

cout<<endl<<"d) allocate()";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q2;

if(q2=='c'||q2=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"What does the 'cout' object do in C++?";

cout<<endl<<"a) Reads input from the console";

cout<<endl<<"b) Writes output to the console";

cout<<endl<<"c) Performs mathematical calculations";

cout<<endl<<"d) Declares a variable";


cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q3;

if(q3=='b'||q3=='B'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"What is the purpose of the 'if' statement in C++?";

cout<<endl<<"a) To execute a block of code repeatedly";

cout<<endl<<"b) To define a function";

cout<<endl<<"c) To declare a variable";

cout<<endl<<"d) To conditionally execute a block of code";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q4;

if(q4=='d'||q4=='D'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which of the following is a valid way to end a C++ statement?";

cout<<endl<<"a) ;";

cout<<endl<<"b) :";

cout<<endl<<"c) ,";
cout<<endl<<"d) .";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q5;

if(q5=='a'||q5=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<endl<<"Total Marks in Quizzes : "<<tq<<endl;

char quiz2(){

char q1;

char q2;

char q3;

char q4;

char q5;

int tq;

tq=0;

cout<<" ******"<<endl;

cout<<" Quiz "<<endl;

cout<<" ******"<<endl<<endl;

cout<<"Which tag is used to define an unordered list in HTML?";

cout<<endl<<"A) <ul>";

cout<<endl<<"B) <ol>";
cout<<endl<<"C) <li>";

cout<<endl<<"D) <list>";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q1;

if(q1=='a'||q1=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"In CSS, which property is used to change the text color of an element?";

cout<<endl<<"A) text-color";

cout<<endl<<"B) font-color";

cout<<endl<<"C) color";

cout<<endl<<"D) text-style";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q2;

if(q2=='c'||q2=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which HTML tag is used to create a hyperlink?";

cout<<endl<<"A) <a>";
cout<<endl<<"B) <link>";

cout<<endl<<"C) <hyperlink>";

cout<<endl<<"D) <href>";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q3;

if(q3=='d'||q3=='D'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"How do you include CSS in an HTML document?";

cout<<endl<<"A) By using the <style> tag within the <head> section";

cout<<endl<<"B) By using the <css> tag within the <head> section";

cout<<endl<<"C) By using the <link> tag within the <body> section";

cout<<endl<<"D) By using the <script> tag within the <head> section";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q4;

if(q4=='a'||q4=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which CSS property is used to control the spacing between lines of text?";
cout<<endl<<"A) line-height";

cout<<endl<<"B) text-spacing";

cout<<endl<<"C) line-spacing";

cout<<endl<<"D) text-height";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q5;

if(q5=='a'||q5=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<endl<<"Total Marks in Quizzes : "<<tq<<endl;

char quiz3(){

char q1;

char q2;

char q3;

char q4;

char q5;

int tq;

tq=0;

cout<<" ******"<<endl;

cout<<" Quiz "<<endl;

cout<<" ******"<<endl<<endl;
cout<<"Which keyword is used to declare a variable in JavaScript?";

cout<<endl<<"A) var";

cout<<endl<<"B) int";

cout<<endl<<"C) let";

cout<<endl<<"D) const";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q1;

if(q1=='a'||q1=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"What will the following JavaScript code output: console.log(5 + 5)?";

cout<<endl<<"A) 10";

cout<<endl<<"B) 55";

cout<<endl<<"C) 55";

cout<<endl<<"D) Error";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q2;

if(q2=='c'||q2=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";
}

cout<<endl<<"Which function is used to add an event listener to an HTML element in


JavaScript?";

cout<<endl<<"A) addEventListener()";

cout<<endl<<"B) attachEvent()";

cout<<endl<<"C) bindEvent()";

cout<<endl<<"D) listenEvent()";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q3;

if(q3=='a'||q3=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"How do you comment out multiple lines in JavaScript?";

cout<<endl<<"A) // This is a comment";

cout<<endl<<"B) /* This is a comment */";

cout<<endl<<"C) <!-- This is a comment -->";

cout<<endl<<"D) This is a comment";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q4;

if(q4=='c'||q4=='C'){

cout<<endl<<"Correct";

tq++;

}
else{

cout<<endl<<"Wrong";

cout<<endl<<"What does the JavaScript function isNaN() do?";

cout<<endl<<"A) Checks if a value is not a number";

cout<<endl<<"B) Converts a string to a number";

cout<<endl<<"C) Checks if a value is an integer";

cout<<endl<<"D) None of the above";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q5;

if(q5=='a'||q5=='A'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<endl<<"Total Marks in Quizzes : "<<tq<<endl;

char quiz4(){

char q1;

char q2;

char q3;

char q4;

char q5;

int tq;
tq=0;

cout<<" ******"<<endl;

cout<<" Quiz "<<endl;

cout<<" ******"<<endl<<endl;

cout<<"Which CSS framework is Bootstrap built on top of?";

cout<<endl<<"A) Foundation";

cout<<endl<<"B) Skeleton";

cout<<endl<<"C) Materialize";

cout<<endl<<"D) Bootstrap itself";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q1;

if(q1=='d'||q1=='D'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which class in Bootstrap is used to create a responsive navigation bar?";

cout<<endl<<"A) .navbar-collapse";

cout<<endl<<"B) .nav";

cout<<endl<<"C) .navbar-toggle";

cout<<endl<<"D) .navbar";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q2;

if(q2=='d'||q2=='D'){

cout<<endl<<"Correct";
tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which meta tag required in the head section of HTML document for Bootstrap
to work properly on mobile devices?";

cout<<endl<<"A) <meta charset= utf-8>";

cout<<endl<<"B) <meta name= viewport content= width=device-width, initial-scale=1>";

cout<<endl<<"C) <meta name= theme-color content= #ffffff>";

cout<<endl<<"D) <meta http-equiv= X-UA-Compatible content= IE=edge>";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q3;

if(q3=='b'||q3=='B'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"In Bootstrap, which class is used to create a responsive grid layout?";

cout<<endl<<"A) .grid";

cout<<endl<<"B) .container";

cout<<endl<<"C) .row";

cout<<endl<<"D) .col";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q4;
if(q4=='c'||q4=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which CDN (Content Delivery Network) hosts the official Bootstrap files?";

cout<<endl<<"A) Google Fonts";

cout<<endl<<"B) jQuery";

cout<<endl<<"C) BootstrapCDN";

cout<<endl<<"D) Cloudflare";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q5;

if(q5=='c'||q5=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<endl<<"Total Marks in Quizzes : "<<tq<<endl;

char quiz5(){

char q1;

char q2;
char q3;

char q4;

char q5;

int tq;

tq=0;

cout<<" ******"<<endl;

cout<<" Quiz "<<endl;

cout<<" ******"<<endl<<endl;

cout<<"What does UX design primarily focus on?";

cout<<endl<<"A) Visual aesthetics";

cout<<endl<<"B) User interactions and experiences";

cout<<endl<<"C) Layout and color schemes";

cout<<endl<<"D) Typography and graphics";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q1;

if(q1=='b'||q1=='B'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which of the following is NOT a principle of good UI design?";

cout<<endl<<"A) Consistency";

cout<<endl<<"B) Clarity";

cout<<endl<<"C) Complexity";

cout<<endl<<"D) Simplicity";

cout<<endl<<endl;
cout<<"Enter Your Answer : ";

cin>>q2;

if(q2=='c'||q2=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"What does the term wireframing refer to in UI/UX design?";

cout<<endl<<"A) Adding color and graphics to a design";

cout<<endl<<"B) Creating a high-fidelity prototype";

cout<<endl<<"C) Defining the layout and structure of a design";

cout<<endl<<"D) Conducting user testing sessions";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q3;

if(q3=='c'||q3=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"Which of the following best describes the purpose of usability testing in UX


design?";

cout<<endl<<"A) Evaluating the aesthetic appeal of a design";

cout<<endl<<"B) Assessing the speed of a website or application";

cout<<endl<<"C) Testing the ease of use and effectiveness of a design";


cout<<endl<<"D) Reviewing the code quality of a website or application";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q4;

if(q4=='c'||q4=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<"What does the acronym UI stand for in the context of design?";

cout<<endl<<"A) User Index";

cout<<endl<<"B) User Interaction";

cout<<endl<<"C) User Interface";

cout<<endl<<"D) User Involvement";

cout<<endl<<endl;

cout<<"Enter Your Answer : ";

cin>>q5;

if(q5=='c'||q5=='C'){

cout<<endl<<"Correct";

tq++;

else{

cout<<endl<<"Wrong";

cout<<endl<<endl<<"Total Marks in Quizzes : "<<tq<<endl;

}
int main(){

string name;

string rollno;

int password;

cout<<" **************"<<endl;

cout<<" Login to LMS "<<endl;

cout<<" **************"<<endl;

cout<<"Enter Your Name : ";

cin>>name;

cout<<"Enter Your Roll Number : ";

cin>>rollno;

cout<<"Enter Your Password : ";

cin>>password;

cout<<endl<<endl;

system("cls");

int category;

int subcategory;

cources();

cout<<endl<<endl<<"Enter Your Choice : ";

cin>>category;

system("cls");

switch(category)

case 1:

cout<<endl;

cout<<" Programming Fundamentals"<<endl<<endl;

categories();

cout<<endl<<endl<<"Enter Your Choice : ";


cin>>subcategory;

cout<<endl;

system("cls");

if(subcategory==1){

attendance();

else if(subcategory==2){

quiz1();

else{

transcript();

break;

case 2:

cout<<endl;

cout<<" Web programming with HTML & CSS"<<endl<<endl;

categories();

cout<<endl<<endl<<"Enter Your Choice : ";

cin>>subcategory;

cout<<endl;

system("cls");

if(subcategory==1){

attendance();

else if(subcategory==2){

quiz2();

else{

transcript();
}

break;

case 3:

cout<<endl;

cout<<" Interactive web Design with JAVASCRIPT"<<endl<<endl;

categories();

cout<<endl<<endl<<"Enter Your Choice : ";

cin>>subcategory;

cout<<endl;

system("cls");

if(subcategory==1){

attendance();

else if(subcategory==2){

quiz3();

else{

transcript();

break;

case 4:

cout<<endl;

cout<<" React & Bootstrap"<<endl<<endl;

categories();

cout<<endl<<endl<<"Enter Your Choice : ";

cin>>subcategory;

cout<<endl;

system("cls");

if(subcategory==1){
attendance();

else if(subcategory==2){

quiz4();

else{

transcript();

break;

case 5:

cout<<endl;

cout<<" UI & UX Designing"<<endl<<endl;

categories();

cout<<endl<<endl<<"Enter Your Choice : ";

cin>>subcategory;

cout<<endl;

system("cls");

if(subcategory==1){

attendance();

else if(subcategory==2){

quiz5();

else{

transcript();

break;

default:

cout<<"Invalid Entry";
}

You might also like