Skip to main content

Posts

Showing posts with the label programming

Student Information System - Java (SLIIT - ST2 PROJECT)

Student Information System (Github Project) This system is developed in Java and mySQL as a group project by me and 3 other members during a period of 1 month. The system allows the administrator to,  enroll students to the system  update enroll information  add/update course and degree program details  generate reports  create exams and edit relevant information  calculate gpa of the relevant exam  assign lecturers to courses  add lecturers/update details Lecturers to,  assign course grades  view their feedback  generate reports  view student / course / degree program details Students to,  view their profile  view their grading information  give feedback to lecturers   view lecturer / course / degree program details and other features. Below are some interfaces of the project. (Splash Screen) (Login) (Admin View) (Student Re...

Object Oriented Programming - C++

Basic Console program using Visual Studio A program to input Student numbers and Student names and to display them at the end. "student.h" Header file class student { private: int stdNo; char stdName[20]; public: void setStdNo(int pNo); void setStdName(char pName[]); void printDetails(); }; "student.cpp" file (where methods are defined) #include "student.h" #include <cstring> #include <iostream> using namespace std; void student::setStdNo(int pNo) { stdNo=pNo; } void student::setStdName(char pName[]) { strcpy(stdName,pName); } void student::printDetails() { cout<<"Student ID is "<< stdNo<<endl; cout<<"Student Name is "<<stdName<<endl; } The main program #include "stdafx.h" #include "student.h" #include <iostream> using namespace std; int _tmain...

A C++ program to input an integer 'n' and get the 'n'th prime number

#include <iostream> using namespace std; int main() {         int n;         cout<<"Input integer for n: ";         cin>>n;         int prime=0;         int count,count1=0;                 for(int x=1;;x++){                         count1=0;                         for(int y=1;y<=x;y++)                         {                                 if(x%y==0)                                 {                           ...

Files in C++

Write a program to keep track of the batting performance of 5 cricketers who are playing a four match one day series. a) Create the data file shown below using vi editor and save it as scores.txt 78 10 -999 30 81 13 -67 10 6 0 0 -999 -999 -999 56 -78 20 22 -90 5 Note: -999 means "did not bat" Positive number is the score the batsman scored. Eg ; 78 Other negative number is to indicate the batsman was not out Eg : - 67 means the batsman got 67 without getting out b) Write a program to do the following. Save this program as abc04.cpp i) Read the scores.txt file and find how many times the batsman played in the one day series. Write the details in to innings.txt file. Sample output Batsman           Inning 1                          3 2                        ...