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

Design and implement a character analyser, Your task is to write an applica...

Your task is to write an application to analyse texts in a file.  Your application will employ  several kinds of text-analyser objects (which you also have to implement)  as descri

Assembly language program, a program that enter an alphabet from the user a...

a program that enter an alphabet from the user and compare it is vowel or not?

Programming, You must programme an analogue clock and digital stopwatch usi...

You must programme an analogue clock and digital stopwatch using the Processing programming language

Assembly programme , write and compile a simple program in Assembly Languag...

write and compile a simple program in Assembly Language that compute and print student grades for a course.which you can open a file, read from it, and compute the results...using

Define an example of switch statement, Define an Example of Switch Statemen...

Define an Example of Switch Statement? estimate(number) int number; /* Estimate a number as none, one, two, several, many */ {       switch(number) { case 0 :

What are the Functions in Computer Programming, What are the Functions in C...

What are the Functions in Computer Programming? A program is completed up of one or more functions, with one of these being main(). Function is a self-contained block of progra

Explain the comma operator- computer programming, Explain the Comma Operato...

Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

Application for a mid , The assignment has two parts: first you generate a ...

The assignment has two parts: first you generate a simple application for a MID that operates independently of other MIDs. As a second part, the application is extended to keep so

Basics of html-hypertext markup language, In the form of hypermedia documen...

In the form of hypermedia documents, Web pages or materials accessed by the Internet can be located anywhere in the world. Regardless of where they originated, most of the Web d

Java source code classes and objects, Design and implement a stringed music...

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of stri

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