Preview

Networks and Protocols

Better Essays
Open Document
Open Document
1123 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Networks and Protocols
ENTS 640 Networks and Protocols I
Fall 2013
Solutions to Homework #5
Assigned: October 19; Due: October 24
H5.1
Write a Java application with a simple class inheritance hierarchy. As shown in the UML diagram below, it should consist of three classes. The Student class, representing a student’s personal and course registration information for a given semester, which will be the superclass. The two subclasses inheriting from the Student class are the FullTimeStudent class, representing a full-time student’s personal and registration info, and the PartTimeStudent class, representing a part-time student.
The rules for valid registration are as follows. All students (both full-time and part-time) must register for at least one course and can register for at most four courses. In addition, full-time students must register for at least three courses to be able to maintain their full-time status, while part-time students can register for at most two courses.

The Student class should have five fields: two static constants, one representing the maximum number of classes/ courses a student can take and one representing the number of credits per class, which is three for all classes. It should also have three instance fields: name, a field for the student’s name, classes, a field referring to a String array that holds the class/course names the student has registered for, and, numClasses, the total number of classes the student has registered for. The constructor should create the classes array, which should be initially empty (the student has not registered for any classes yet) and initialize the other fields as well. The getNumClasses() method should return the number of classes the student has registered for, and the verifyRegistration() method should return true if the student’s registration is valid, and false otherwise. (Note: the student class does not have any information about whether the student is full-time or part-time, so it should check

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1330 Unit 5 Exercise 1

    • 595 Words
    • 3 Pages

    • It should permit students to examine currently available courses, add and drop courses to and from their schedules, and examine the courses for which they are enrolled. • Department staff should be able to print a variety of reports about the courses and the students enrolled in them. • The system should ensure that no student takes too many courses and that students who have any unpaid fees are not permitted to register.…

    • 595 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    SQL Queries

    • 423 Words
    • 2 Pages

    These tables would be linked together by foreign keys; Enroll Table would be linked to Student table by FKStuID; Class would be linked to Enroll Table by FK ClassID…

    • 423 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    BA 2196 F14 Syllabus

    • 4163 Words
    • 23 Pages

    courses in their major, and it also counts as a lower level Business Core Course. Students who take this course to fill…

    • 4163 Words
    • 23 Pages
    Powerful Essays
  • Good Essays

    Yes man

    • 904 Words
    • 4 Pages

     Verification must include student’s name as a competitor along with the competition’s name and date.…

    • 904 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Wh Ap Course Guidelines

    • 1674 Words
    • 7 Pages

    1. NOTEBOOK: Students will have to keep a class notebook. The notebook will be for notes/handouts/assignments/ and VOCABULARY (unless you have a separate notebook for vocabulary). Notebook MUST be a three ring binder-so papers can be added where necessary. It is expected that all students will maintain their notebook with all class material in CHRONOLOGICAL order. Notebook will be set up in chapters/parts, just as material is covered in the class and textbook. Notebooks can be checked at random. **The Course Syllabus/Course Requirements MUST be the first pages in your notebook.…

    • 1674 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    2) Then from this page in the middle of the page there should be a box that says Students> click on “Get Registered”…

    • 153 Words
    • 1 Page
    Satisfactory Essays
  • Better Essays

    Accounting 260

    • 1657 Words
    • 7 Pages

    studied in a student’s last semester so enrolments are restricted for this unit to those students who after Semester…

    • 1657 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    history

    • 644 Words
    • 5 Pages

    students will be required to take courses offered by their College that have been designated to fulfill…

    • 644 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Purdue Mgmt 602 Syllabus

    • 787 Words
    • 4 Pages

    To keep the track of class participation by each student, the instructor will bring a participation record sheet for each class. Only those students who have actually participated in class…

    • 787 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    Financial Analysis involves evaluation of business, budgets, projects etc to ensure stability, liquidity, and solvency and at last profitability of the business in presence of domestic and global macro-economic environment to determine suitability of investment. This evaluation is not completely objective and gets impacted by personal biases of the analysts which result into misleading outputs for investors. Many analysts get influenced by herd mentality and try to follow the presently accepted mood of the people.…

    • 1734 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    Syllabus

    • 1706 Words
    • 7 Pages

    Students must complete ACCT 5020, FINA 5040, ECON 5000, BCIS 5090, DSCI 5010 before enrolling…

    • 1706 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    FORM B (specific course information) |Course Name/Title |Process Management in Manufacturing/ OPIM 656 | |Program |MBA | |(e.g. MBA or Ph.D.) | | |Required or elective |Elective | |Instructor(s) Name and email address |Anita Tucker tuckera@wharton.upenn.edu | | | | |Number of Class sessions in course |26 | |Duration of each class (minutes) |80 | |Typical number of students enrolled in recent |37 | |course offerings. | | |Textbook Used |No | |Misc.…

    • 5003 Words
    • 21 Pages
    Good Essays
  • Powerful Essays

    requirements of a Dual Enrollment Program could cause your grades to suffer and defeat its own…

    • 1974 Words
    • 8 Pages
    Powerful Essays
  • Powerful Essays

    I would like to express my heartfelt gratitude to my teacher ------------ for the guidance, care and help given to me to complete my case analysis successfully.…

    • 2015 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    Course identification Class number Class title Days/Times the class is offered Assigned room for the class The beginning and end dates for the class The number of students enrolled…

    • 559 Words
    • 3 Pages
    Satisfactory Essays

Related Topics