Skip to main content

CS506 Assignment no 1 java


CS506-Assignment no 1 java

Employee.java

 public class Employee {

private int empid;

private String empName;

//vuportal.com

private int empExperience;

private String qualification;

private int Salary;

private String dept;

public int getEmpid() {

return empid;

}

public void setEmpid(int empid) {

this.empid = empid;

}

public String getEmpName() {

return empName;

}

public void setEmpName(String empName) {

this.empName = empName;

}


public void setQualification(String qualification) {

this.qualification = qualification;

}

//vuportal.com

public int getSalary() {

return Salary;

}

public void setSalary(int salary) {

Salary = salary;

}

public String getDept() {

return dept;

}

public void setDept(String dept) {

this.dept = dept;

}

import java.util.ArrayList;

import java.io.File; 

import java.io.FileNotFoundException; 

import java.util.Scanner;


Main.java

//vuportal.com

public class Main {

public static void main(String[] args)  {

ArrayList<Employee> employees = new ArrayList<Employee>();


System.out.println("\t\t\tVU PORTAL");

System.out.println();

 

System.out.println("File Data :");

System.out.println();

 

 System.out.println("\t\t\tVU PORTAL");

System.out.println();

 //vuportal.com

   File myObj = new File("D:/employees.txt");

 Scanner myReader = new Scanner(myObj);

while (myReader.hasNextLine()) {

 String data = myReader.nextLine();

 lines++;

    System.out.println(data);

 char[] ch=data.toCharArray();

 String[] string = data.split(", ");

   Employee emp = new Employee();

    emp.setEmpid(Integer.parseInt(string[0]));

    emp.setEmpName(string[1]);

    emp.setDept(string[2]);

    emp.setQualification(string[3]);

    emp.setEmpExperience(Integer.parseInt(string[4]));

    emp.setSalary(Integer.parseInt(string[5]));

//vuportal.com

    employees.add(emp);

  for(int i=0 ; i<ch.length ;i++)

  {

  if(Character.isAlphabetic(ch[i]))

    alphabet++;

      else if(Character.isDigit(ch[i]))

      integers++;

      else if (Character.isSpace(ch[i]))

    space++;        

   }


System.out.println("\t\t\tVU PORTAL");

System.out.println();

 

 

      characters=characters+ch.length;

       words=29;

}

     myReader.close();

   

   

  System.out.println();

   System.out.println("\t\t\tNo of Employees  "+employees.size());

   System.out.println();

   System.out.format("%2s %15s %15s %10s %10s %10s","Emp_ID","Emp_Name","Emp_Dept",

   "Emp_Qualif","Emp_Experience","Emp_Salary");

   

   System.out.println("\n----------------------------------"

+ "-----------------------------------");

  for(Employee emp: employees){

   System.out.format("%2d %20s %10s %10s %10d %10d",

     emp.getEmpid(), emp.getEmpName(), emp.getDept(), 

    emp.getQualification(), emp.getEmpExperience(), emp.getSalary());

    System.out.println();

    System.out.println("\n---------------------------------------"

    + "------------------------------");

    

  }


 System.out.println("\t\t\tVU PORTAL");

System.out.println();

  

  System.out.println();

  System.out.println("\t\t\tFile Record");

  System.out.println();

  System.out.println("\n------------------------------------------------------"

+ "------------------------------");

  System.out.println();

  System.out.format("%2d %15d %15d %15d %15d %15d",characters , space , words ,

  lines,alphabet, integers);

 System.out.println("\n------------------------------------------------------"

+ "------------------------------");

}

}


FOR UNIQUE SOLUTION AND UNDERSTANDING IT HOW IT WILL RUN CONTACT ON 


WHATSAPP

03235458470

PURPOSE OF VUPORTAL865.COM

Virtual university is Providing quality of Education in Pakistan and Overseas too. Thousands of Students getting quality education. Virtual University of Pakistan is first university In Pakistan that providing online education to everyone in Pakistan. in this university online Education is easy and Affordable for everyone.

Most students find trouble scheduling time for their assignments since the research work is a time-consuming activity. Even so, others find trouble writing their assignment due to a lack of writing skills. Such students need to worry no more since there are several available online assignment help websites. As such, this article provides the top 10 most trusted online assignment help websites that ensure that students get the best out of their assignment help services.

We take your assignments with paramount importance as happy students are our primary goal. Our services are the most affordable, trustworthy and cover a lot of subjects.

Assignment Submission Instruction

Please read the following instructions carefully before submitting the assignment:
It should be clear that your assignment will not get 0 if:

Ø  The assignment is submitted after the due date.

Ø  The submitted assignment file is corrupt or does not open.

Ø  Assignment is copied from any where like any student or from internet.

How to Submitted Assignment:

Ø Download a question File of the Assignments on LMS.

Ø Solve a question and make a file own words.

Ø Save an Answer file in which extension who Instructor Told.

Ø Go to the LMS and Click the Books Code which you can make a solution file.

Ø Go to the Submitted Option and Click the Chose File Button.

Ø File chose where you can Save the File.

Ø After chose the File last step click the Submitted Option.

 

 

For Paid  Assignments Solution

Contact us on WhatsApp

MR Ammar(Developer)    +923235459470

MR Atif (Blogger)         +923086278790

MR Umar  (WordPress Expert)    +923053183537

Mam Farah(Assignment Expert)     +994409089591 

 

FOR ALL ASSIGNMENTS VISIT THE WEBSITE BELOW

CLICK HERE

 

 

 

 

Comments

Popular posts from this blog

CS601 Assignment no 1

                 CS601   Assignment No 1                  Solution Spring 2021                 Last date 19 May , 2021 SOLUTION FILE Download File PURPOSE OF VUPORTAL865.COM Virtual university is Providing quality of Education in Pakistan and Overseas too. Thousands of Students getting quality education. Virtual University of Pakistan is first university In Pakistan that providing online education to everyone in Pakistan. in this university online Education is easy and Affordable for everyone. Most students find trouble scheduling time for their assignments since the research work is a time-consuming activity. Even so, others find trouble writing their assignment due to a lack of writing skills. Such students need to worry no more since there are several available online assignment help ...

CS301 Assignment no1

        CS301 - Assignment   1   Solution   Spring   2021   #include <iostream> #include <string> #include <iostream> #include <string> #include <sstream> using namespace std; class node{ public: std::string name; short int coursecode; node* ptr; }; class student{ private: node* head; public: student(){ head = '\0'; } void insertStu(node**,node*); void newNode(); void showAll(int code); }; void student:: insertStu(node** head,node* newNode){ node* current; if(*head=='\0'){ *head=newNode; }else{ current=*head; } while(current->ptr !='\0'){ current=current->ptr; } newNode->ptr=current->ptr; current->ptr=newNode; cout<<endl; cout<<"student information save successfully "; } void student:: newNode()...

cs610

                                                                cs610