Assigment 2 Wad

Satisfactory Essays
Topics: Subroutine
Assignemt # 2

Subject: “ Web Application Development “

Name :
Reg#:
Section :

Submitted to: PROF.Shoaib Farooq

import java.util.*; class Student1 {
String name;
Student1 () {name=null; }
Student1 (String n) {name=n; } void setName(String n) {name=n;}
String getName() { return name;}
}
class Course {
String title;
Course () {title=null; }
Course (String n) {title=n; } void setTitle(String n) {title=n;}
String getTitle() { return title;} void dropCourse(){this.title=null;}
}

class Registration{
Student1 s;
Course c;
String reg; void setRegName(String n) {s.setName(n);}
String getRegName() { return s.getName();}

void setRegTitle(String n) {c.setTitle(n);}
String getRegTitle() { return c.getTitle();}

void register(String s,String c ) { this.setRegName(s); this.setRegTitle(c);
}

void regNumber(int s){ reg=reg+s;}

void dropCourse(){ c.dropCourse();} void print(){
System.out.print(s.getName() + " Register ");
System.out.println(c.getTitle());
}

public void mainMenu() { int opt; c=new Course(); s=new Student1();

}
}

class MainMenu {
Registration objr[]=new Registration[30];
Scanner scan=new Scanner(System.in);

int count=0; public void mainMenu() { int opt;

do{

System.out.print("Press 1 to Add Student\nPress 2 to Enter Course\nPress 3 to Registration\nPress 4 to Show Current Student Press\nPress 5 to Drop Student\nPress 6 to EXit "); opt=scan.nextInt(); objr[count]=new Registration(); if(opt==1){ System.out.println("Enter Student Name"); objr[count].setRegName(scan.next()); } else if(opt==2){
System.out.println("Enter Course Name"); objr[count].setRegTitle(scan.next()); } else if(opt==3){

objr[count].register(objr[count].getRegName(),objr[count].getRegTitle()); count++; } else if(opt==4){ objr[count].print(); } else if(opt==5){

You May Also Find These Documents Helpful

  • Good Essays

    Wad A Watershed Lab 2

    • 804 Words
    • 3 Pages

    TITLE: Wad a Watershed Lab INTRODUCTION: Using models is very important in science. In this lab, you will design a model that will help you investigate the relationship between land surfaces and water on Earth. OBJECTIVE: To design a model that will help you visualize watershed characteristics. PROBLEM: How can we use the relationships between land surfaces and water to understand conservation of resources and pollution? HYPOTHESIS: In your own words, write a hypothesis about how the relationships…

    • 804 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Assigment 2

    • 276 Words
    • 2 Pages

    trade because most of the population affects with the climate and regional weather. As Saudi Arabia only deals with Oil because climate only allows them to deal with it greatly and rest of the business are not so well doing in the country. Answer 2: To help the contract with the payment of $100,000 is legal but Auger should make sure that weather he is making the decision with practical thoughts or just got carried away with the talks of the other party. By making a payment he is also doing business…

    • 276 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    assigment 2

    • 2462 Words
    • 8 Pages

    Assignment Lecture: Dipan K Mehta Full name of student: Bui Huy Hoang Student ID: 13207758 Due date: 3rd January 2014 Words: 2,333 words GOOGLE WITH THEIR STRATEGIC HUMAN RESOURCES PRATICES Introduction page 1 Analysis page 2 Recruiting and Hiring Employees page 2, 3 Training and development page 3, 4 Planning and Administering Pay and Benefits page 4, 5 Conclusion page 5, 6 References page 7 Question: Choose any organisation of your choice, i.e. any MNC or SME operating in any…

    • 2462 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    assigment 2

    • 1119 Words
    • 5 Pages

    Problem Set 2 Dagoberto Gonzalez Paez Student ID --65824138 November 28, 2013 1. Suppose that you can trade a riskless asset that yields 5% and two risky assets A and B. The expected return of asset A is 8% and that of asset B is 11%, while the standard deviation of asset A is 14% and that of asset B is 23%. The covariance between assets A and B is ?0:0322. Solution . rA,B= CovAR(A,B) / [(σA)(σB)] = -0.0322 / (14%)(23%) rA,B = -1 But when rA,B = -1, (σp)^2 = [wA(σA)…

    • 1119 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Assigment #2

    • 748 Words
    • 3 Pages

    Kiet Lam Professor Melissa A. Basalla English 101 27 March 2013 Nowadays the effect of modern society have clearly shown on human society after 1950’s; however, there still have people live in minority types of family role in the united states and others Asian, Middle East, and Africa are known that man as breadwinner and woman as homemaker. There are few categories that play primary factors including culture and religion, and they become a barrier for people want to live in modern society…

    • 748 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    WAD 1

    • 5379 Words
    • 16 Pages

    Task 1 – Functions and Advantages of Web Applications Stuttard, 2008, states that the majority of websites online currently are actually in-fact applications, as they are dynamic and rely on a two-way flow of information and interactivity/interaction between the server and the client. This in stark contrast to the early days of the web, when websites mostly consisted of HTML pages containing static information. Many of the functions one might associate with the modern Internet are in-fact conducted…

    • 5379 Words
    • 16 Pages
    Powerful Essays
  • Satisfactory Essays

    bel313 assigment 2

    • 334 Words
    • 2 Pages

    BEL 313 “THE USES OF HONEY’S BEE” PREPARED BY 1. NOR ARINI BINTI ABD KADER 2011194425 2. HAFIZAH BINTI ZAINAL ABIDIN 2011173075 PREPARED FOR MISS NADIAH BINTI YAHYAUDDIN MAP 1 MAP 2 MAP 3 Honeys are used in medical applications for its antiseptic or antioxidant property. Reason: Researches are turning up new evidence of honey’s medical benefits such as antiseptic, antioxidant and cleansing properties for our used thousands…

    • 334 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Celta: Assigment 2

    • 1612 Words
    • 7 Pages

    References: (1) Swan, M. And Smith B.(2001) Learner english Cambridge University Press (2) AbiSamra N…

    • 1612 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Assigment

    • 1182 Words
    • 5 Pages

    | |Duration |: |3 Hours | Please read the instructions below: 1. You are not allowed to start until the invigilator has instructed you to do so. 2. Place all bags, notes and books at the front of the exam/test room 3. You are allowed to put on your desk ONLY these items: a. This exam/test paper b. Writing instruments and approved stationery items c. Non-programmable…

    • 1182 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    assigment

    • 956 Words
    • 4 Pages

    Subject: ASSIGMENTS FOR THE THIRD SEMESTER Qoestion . Prepare Management Presention guidelines to improve communication between the management and employees. Interest in Quality Circle activities of the management. Fostering good working relationship amongst the working staff of the organization. The Quality Circle gains reorganization and morale boosting of the employees. Answer: Quality circles…

    • 956 Words
    • 4 Pages
    Satisfactory Essays