Classroom management, Programming Languages

Assignment Help:

A partly completed project Cwk 4-students is available for downloading from Studynet Assignments. You are required to amend this BlueJ project to implement a version of the WHEN system by completing tasks below.

Task 1 - Amend the Member class

1.1 Define an accessor getYears(), which returns the number of years in teaching

1.2 Declare a field to store the member's id number. Amend the constructor so that it has an additional parameter of an appropriate type which it then uses to initialise the id number field.

1.3 Define an accessor getIdNumber(),to return the member's id number.

1.4 Define a mutator addCredits() to increment the member's credits by an amount provided by a parameter value.

1.5 Define isOrdinary() to return true if the number of years of membership means that the member qualifies as an "Ordinary" member, false otherwise. (see specification above)

1.6 Define an accessor getGrade() which returns the member's grade as a String, depending on their years in teaching. (see specification above)

1.7 Amend the method toString() to include the member's id, name, their credits, teaching years and grade in the String which it returns

1.8 Define the method showYears()which will write as many stars in the terminal window as a member's years in teaching e.g. if a member has 5 years in teaching, the method writes 5 stars

 

Task 2 - Complete the Seminar class

2.1 Some fields have been provided. You need to provide fields to store: the seminar title, the number of places available. (See specification above for more information on these fields)

2.2 Define accessors getFee(),getTitle(),getDate() for the seminar fee, title and date.

2.3 Define a constructor with the following parameters: a code, title (each of which should be a String), number of places and credits (each should be int), and additional fee (should be a double).


Task 3 - Add member information to the Seminar class

3.1 Each seminar must also store a collection of members who have attended the seminar. A field called attenders which can be used to store the collection of members in an ArrayList has been declared. Ensure that attenders is created.

Define methods:

3.2 attend() which allows the member specified as a parameter to attend the seminar by adding them to the attenders. The seminar's credits should be added to the member's credits and the fee paid by the member added to the seminar's total fees.

3.3 isFull() which returns true if the seminar is full, and false otherwise.

3.4 toString() which returns a String representation of all the details of the seminar including those attending the seminar.

Task 4 - Amend the Branch class

The Branch class stores the branch's name and also has two fields: allSeminars and allMembers. allSeminars stores the collection of seminars and allMembers stores the collection of members.

4.1 Declare the allMembers field and ensure that all fields are initialised

Define methods:
4.2 addMember() which adds a Member object to the collection of all members at the branch

4.3 printAllMembers() which outputs to the terminal window details of all members at the branch

4.4 joinSeminar() which allows a Member to attend a Seminar (both the Member and the Seminar should be parameters) and outputs a suitable message to terminal window .

4.5 printAllBranchInfo() which prints to the terminal window all Branch information including its name, members and seminars


Task 5 - Amend Tester class
The purpose of the Tester class is to test the methods in the Branch class. You may be able to write the code for these tasks even if your methods do not work properly.

5.1 Declare and create the following Member objects:
object Id Name Teaching Years
m1 123 Amy 2
m2 234 Ben 3
m3 345 Chen 15
m4 456 Den 8


In the doTest() method, by making appropriate method calls on relevant objects:

5.2 Add all members m1, m2, m3 to the "Barnet" branch already declared in the Tester class

5.3 Allow the following members to attend the following seminars :
Member Seminar
m1 s1
m2 s1
m1 s2
m2 s2
m3 s2

5.4 Withdraw m2 from s2

5.5 Output to the terminal window all the information about this branch including all its members and seminars

Task 6 - Improving the Branch class

6.1 In the Branch class, make amendments to make your system robust, and to maintain the integrity of the data stored. It should NOT be possible :

• for a member to attend a seminar, if that member is already attending
• for a member to attend a seminar, if that member is not a member of the branch
• for a member to attend a seminar, if the seminar is full

If any of these tests fails, a suitable message is output to the terminal window, but no further action is taken.

6.2 Provide printNewMembers() which prints the details of all the "beginner" members of the Branch

6.3 Provide printPoorAttenders() which takes one int parameter giving a number of credits and outputs to the terminal window details of all members with fewer credits than this parameter value


Related Discussions:- Classroom management

Python, interference of waves

interference of waves

Differentiate between high level and low level languages, The languages use...

The languages used in the module are of a type known as high-level languages. There is another set of languages known as low-level languages. (a) Differentiate between high-leve

Shell script to count of five character words, Normal 0 false ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Pascal, how do i make a bomber game using pascal on a software called lazur...

how do i make a bomber game using pascal on a software called lazuras

Write a function that will read the atoms for a protein, Write a function r...

Write a function readPDBfile('filename') that will read the atoms for a protein stored in a PDB file, whose name is provided as an input to the function (note that this name should

Class a abstract data type, Class a Abstract Data Type: is a template for c...

Class a Abstract Data Type: is a template for creating objects. A class describes a collection of related objects i.e. instances of the classes. Basically classes are user-defined

C language, write a program to find the output 1 ...

write a program to find the output 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

C.., I am still waiting on a quote from you

I am still waiting on a quote from you

Program for keep track of the titles of ebooks, This assignment will just f...

This assignment will just focus on NookyKindle eBook orders.  That is, we'll be keeping track of the titles of eBooks and the number of orders for that particular eBook during a pa

Program third command line argument, Most popular news websites publish the...

Most popular news websites publish their RSS ( Really Simple Syndication ) feeds. If you haven 't heard of RSS, you may have a look at this article on Wikipedia. In this assignm

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd