CS4001NT Programming Coursework 01 Question Paper 2025 | LMU

Published: 16 May, 2025
Category Coursework Subject Programming
University London Metropolitan University Module Title CS4001NT Programming
Due Date 16th of  May 2025 at 11:59 PM
Coursework Type Individual
Coursework Weight This coursework accounts for 60% of the overall module grades.
Submission Instructions

Submit the following to the Itahari International College’s

MST portal before 01:00 PM on the due date:

Instructions:

  • A report (document) in PDF format in the MST portal or through any medium that the module leader specifies.
Academic year 2025

Plagiarism

You are reminded that there exist regulations concerning plagiarism. Extracts from these regulations are printed overleaf. Please sign below to say that you have read and understand these extracts:

Extracts from University Regulations on Cheating, Plagiarism and Collusion

Section 2.3: “The following broad types of offence can be identified and are provided as indicative examples ….

  • Cheating: including taking unauthorised material into an examination; consulting unauthorised material outside the examination hall during the examination; obtaining an unseen examination paper in advance of the examination; copying from another examinee; using an unauthorised calculator during the examination or storing unauthorised material in the memory of a programmable calculator which is taken into the examination; copying coursework.
  • Falsifying data in experimental results.
  • Personation, where a substitute takes an examination or test on behalf of the candidate. Both the candidate and substitute may be guilty of an offence under these Regulations.
  • Bribery or attempted bribery of a person thought to have some influence on the candidate’s assessment.
  • Collusion to present joint work as the work solely of one individual. (vi) Plagiarism, where the work or ideas of another are presented as the candidate’s own. (vii) Other conduct calculated to secure an advantage on assessment. (viii) Assisting in any of the above.

Some notes on what this means for students:

  • Copying another student’s work is an offence, whether from a copy on paper or a computer file, and in whatever form the intellectual property being copied takes, including text, mathematical notation, and computer programs.
  • Taking extracts from published sources without attribution is an offence. To quote ideas, sometimes using extracts, is generally to be encouraged. Quoting ideas is achieved by stating an author’s argument and attributing it, perhaps by quoting, immediately in the text, his or her name and year of publication, e.g. “e = mc2 (Einstein 1905)”. A reference section at the end of your work should then list all such references in alphabetical order of authors’ surnames. (There are variations on this referencing system which your tutors may prefer you to use.) If you wish to quote a paragraph or so from published work, then indent the quotation on both left and right margins, using an italic font where practicable, and introduce the quotation with an attribution.

Need plagiarism-free Answers for your college/ university Coursework

 Order Non-Plagiarised Coursework

Contract Cheating

Contract cheating (also known as assessment outsourcing, commissioning or ghost writing) is when someone seeks out another party, or AI generator service, to produce work or buy an essay or assignment, either already written or specifically written for them or the assignment to submit as their own piece of work.

Contract cheating undermines the integrity of the academic process and devalues the qualifications awarded by the university. Students are reminded that academic integrity is a fundamental principle of our institution. Engaging in contract cheating not only impacts the individual’s academic record but also the reputation of the university.

Students are encouraged to seek support if they are struggling with their coursework. The university offers a range of resources, including academic counselling, tutoring services, and workshops on study skills and time management. Utilising these resources can help students achieve their academic goals without resorting to dishonest practices.

Penalty:

  • Failure in the Module: The student must re-register for the same module, and the re-registered module will be capped at a bare pass.
  • Ineligibility to Continue on the Course: Where re-registration of the same module, or a suitable alternative, is not permissible, the student will not be able to continue on the course. Additionally, the following penalty will be applied to the student’s final award:
  • Undergraduate Honours: The student’s final classification will be reduced by one level.
  • Unclassified Bachelors: Downgraded to Diploma in Higher Education. o Foundation Degree: Distinction downgraded to Merit; Merit downgraded to Pass; Pass downgraded to Certificate in Higher Education.
  • Masters: Distinction downgraded to Merit; Merit downgraded to Pass; Pass downgraded to Postgraduate Diploma.

Reporting and Consequences:

Instances of contract cheating will be thoroughly investigated, and students found guilty will face the penalties outlined above. It is the responsibility of every student to ensure that their work is their own and to avoid situations that could lead to accusations of academic misconduct.

By adhering to these standards, students contribute to a fair and equitable academic environment, ensuring the value and recognition of their qualifications are maintained.

Aim

This assignment aims to implement a real-world problem scenario using the Object-oriented concept of Java that includes creating a class to represent a GymMember, together with its two subclasses to represent Regular Member and Premium Member, respectively.

The GUI part of the coursework focuses on expanding the project by integrating a new class to implement a graphical user interface (GUI). The goal is to create a system that stores Gym Member details within an ArrayList. This class will contain the main method and will be executed via the command prompt. Additionally, you are required to submit a report explaining the functionality and structure of your program.

Deliverables

Create a new project in Bluej and create three new classes (Gym Member, Regular Member and Premium Member) within the project. Regular Member and Premium Member are subclasses of the class Gym Member.

For the GUI implementation part, add a new class to your project named Gymgui. Once your solution is complete, submit the Gymgui.java file along with the GymMember.java, RegularMember.java, and PremiumMember.java files. Ensure that no other files from the project are included. Additionally, submit your report in PDF format.

Scenario

You are developing a system to manage members of a gym that offers different membership plans and tracks attendance and loyalty points. Each member is identified by a unique ID and has personal details such as their name, location, phone number, email, membership start date, and membership plan. You have to keep track of how often members visit the gym (attendance) and their accumulated loyalty points.

NOTE: – The program should include the following classes (with no additional attributes or methods).

Hire Experts to solve this Coursework Before your Deadline

Buy Today, Contact Us

Program (55 marks)

Parent Class: GymMember [5 marks]

The GymMember is a parent class as an abstract class which has the following attributes with their respective data type and with a protected access modifier as mentioned below:

id – int

name – String location: String phone – String email – String gender – String

DOB – String

membership Start Date – String, attendance – int

loyalty Points – double

active Status – boolean

The constructor of this class accepts id, name, location, phone, email, gender, DOB, and membership Start Date as parameters. The attributes attendance and loyaltyPoints are initialised to zero, and the active Status is set to false. Additionally, assign id, name, location, phone, email, membershipStartDate, plan and price with the parameter values.

Each attribute has a corresponding accessor method.

An abstract method, mark Attendance (), is created to track the attendance of the member.

A method activateMembership() sets activeStatus to true when the membership needs to be activated or renewed, and a method deactivateMembership() sets the activeStatus to false if the membership needs to be deactivated or paused.

[Note: The membership must be activated first to deactivate. Also, the membership is deactivated by default.

Also, the method reset Member() is created to set the activeStatus of the member to false, attendance is set to zero and loyaltyPoints to zero.

A display method should output (suitably annotated) the ID, name, location, phone, email, gender, DOB, membership Start Date, attendance, loyalty Points and active Status.

Subclass: Regular Member [10 marks]

The Regular Member class is a subclass of the GymMember class, and it has six private attributes with the following data types:

attendanceLimit – int (final)

isEligibleForUpgrade – boolean

removalReason – String

referralSource – String

plan – String

price – double

The constructor accepts nine parameters which are id, name, location, phone, email, gender, DOB, membershipStartDate and referralSource. A call is made to the superclass constructor with eight parameters. The attribute isEligibleForUpgrade is set to false, attendanceLimit is set to 30, plan is set to basic, price is set to 6500 and removalReason is set to empty. Also, assign other attributes with corresponding parameter values.

Each attribute of RegularMember class has a corresponding accessor method.

Implement the abstract method markAttendance() to increment the attendance value by 1 each time this method is invoked. Also, the loyaltyPoints should be increased by 5 points.

There is a method named getPlanPrice() with return type double to retrieve the price of the provided plan. This method accepts plan as a parameter and returns its corresponding price. The following are the pricings of available gym plans:

basic 6500

standard 12500

deluxe 18500

The switch statement must be implemented for this specific scenario to return the corresponding plan’s price.

[Note: if the invalid plan is passed as an argument then the getPlanPrice() method should return -1]

There is a method upgradePlan() with return type String. This method is used to upgrade the plan subscribed by the member. The method accepts plan as a parameter. If the member is eligible for upgrading the plan, then the plan and price should be updated accordingly by calling getPlanPrice() method.

Also, the system should validate and display an appropriate message if the same plan is chosen that the member is currently subscribed to.

Note: If getAttendance() >= attendanceLimit then set isEligibleForUpgrade to true

[Hint: if the method get PlanPrice() returns -1, then an appropriate message should be displayed. The upgradePlan() method should return the appropriate message, as the return type of the method is String.

Now, create the revertRegularMember() method, which accepts removalReason as a parameter. A super class method: reset Member() is called here, and isEligibleForUpgrade is set to false, plan is set to basic and price is set to 6500. Also, assign other attributes with corresponding parameter values.

A method to display the details of the Regular Member is required. It must have the same signature as the display method in the parent class. It will call the method in the super class to display all the attributes of the super class. Also, display the value of attributes: plan and price. Additionally, display the removalReason if its value is not empty.

Subclass: Premium Member [10 marks]

The PremiumMember class is a subclass of the GymMember class, and it has three attributes:

premiumCharge – double(final)

personalTrainer – String

isFullPayment – boolean

paidAmount – double

discountAmount – double

The constructor accepts nine parameters which are id, name, location, phone, email, gender, DOB, membershipStartDate, and personalTrainer. A call is made to the superclass constructor with eight parameters. The attribute premiumCharge is set to 50,000, paidAmount is set to 0, and isFullPayment is set to false, and discountAmount is set to zero. Also, assign other attributes with corresponding parameter values.

Each attribute of PremiumMember class has a corresponding accessor method. Here, a method payDueAmount() of return type String is created to pay the due amount. It accepts paidAmount as a parameter. Received paidAmount from the parameter should be added on paidAmount attribute.

Following validations should be made inside this method:-

 if payment is already full (this.isFullPayment == true),a suitable message should be displayed and returned.

 if the total paid amount is more than the premium charge, a suitable message should be displayed and returned.

Now, If the payment is successful, a suitable message should be displayed and returned, including the remaining amount to be paid. The value of isFullPayment will also be updated accordingly.

[remainingAmount = premiumCharge – this.paidAmount]

[Hint: if the total paidAmount is equal to the premiumCharge, then isFullPayment should be set to true, otherwise false.]

There is a method named calculateDiscount(). This method is used to calculate discount amounts based on payment status. If the payment is full then the premium member will get a 10% discount on the premium plan’s charge, otherwise, there will be no discount. Here, if the discount is calculated successfully, the value of the discountAmount attribute will be updated, and a suitable message will be displayed.

[Note: If isFullPayment == true then discountAmount = 10% of plan’s price]

Create a method named revertPremiumMember() which calls the super class resetMember() method. Additionally, the value of personalTrainer is set to empty, isFullPayment is set to false, and paidAmount and discountAmount are set to zero.

A method is required to display the details of the PremiumMember, and it must have the same signature as the display method in the parent class. It will call the method in the super class to display all the attributes of the super class. Additionally, it should display the value of personalTrainer, paidAmount and isFullPayment. Also, the remaining amount to be paid should be calculated and displayed with a suitable annotation. Also, discountAmount will only be displayed if the payment is done completely.

[ Hint: remainingAmount = premiumCharge – this.paidAmount ]

GUI Implementation – Part [25 Marks]

Your GUI should include the same components, but you have the flexibility to choose a different layout if it enhances aesthetics or usability. The GymGUI class must maintain an ArrayList (not a simple array) of the GymMember class, which will hold both RegularMember and PremiumMember objects.

[Note: Only one ArrayList should be created.]

There should be following text fields for entering:

1. Id

2. Name

3. Location

4. Phone

5. Email

6. Gender

7. DOB

8. Membership Start Date

9. Referral Source

10. Paid Amount

11. Removal Reason

12. Trainer’s Name

Also, there should be a non-editable text field for regular plan price, premium plan charge and discount amount.

The gender should be displayed as a radio button.

The Plan (Basic, Standard, Deluxe) attribute should be displayed as a JComboBox for plan selection for regular members only.

10

The GUI should have the following buttons to perform specific task:

1. Add a Regular Member

When this button is pressed, the input values from the text fields (ID, Name, Location, Phone, Email, Gender, DOB, Membership Start Date,Referral Source) will be used to create a RegularMember object. This object will then be added to an ArrayList of the GymMember class.

Note: Member ID duplication is prohibited. Each member, whether Regular or Premium, must have a unique Member ID]

2. Add a Premium Member

When this button is pressed, the input values from the text fields (ID, Name, Location, Phone, Email, Gender, DOB, Membership Start Date, Personal Trainer) will be used to create an object of Premium member and this object will then be added to an ArrayList of the GymMember class.

[Note: Member ID duplication is prohibited. Each member, whether Regular or Premium, must have a unique Member ID.]

3. Activate Membership

The Member Id should be entered in the GUI to activate membership. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system, then call the method to activate membership from GymMember class.

4. Deactivate Membership

The Member Id should be entered in the GUI to deactivate membership. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system, then call the method to deactivate membership from GymMember class.

5. Mark Attendance

First, the Member Id should be entered in the GUI to mark attendance. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system, then call the method to mark attendance from GymMember class.

[Note: if only active status of member is true, proceed with mark attendance] 6. Upgrade Plan

The Member Id is entered, and the required Plan selected in the GUI. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system, then call the method to upgrade plan from RegularMember class. Upgrading the plan is only possible if the member is active.

[Hint: An object of GymMember is cast as RegularMember.]

7. Calculate Discount

To calculate a discount, the Member Id is entered. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system, then call the method to calculate discount from PremiumMember class.

[Hint: An object of GymMember is cast as RegularMember.]

8. Revert Member

To remove a member, the MemberID is entered in the GUI. When this button is pressed the, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system and then call the method to revert member from both RegularMember and PremiumMember class.

[Note: there should be two separate buttons for reverting the members of each class]

Get the Solution of this Coursework

Order Non Plagiarized Coursework

9. Pay Due amount

To pay the due amount, the MemberID , and amount to be paid is entered in the GUI. When this button is pressed, the input value of Member Id is compared to the existing Member Id. If the entered Member Id is valid and exists in the system and then call the method to pay the due amount of the Premium gym member.

10.Display

When this button is pressed, the information of all the members of the respective class should be displayed in a separate frame/panel in the GUI.

11. Clear

When this button is pressed the entered values from text fields should be cleared and the check box should be unchecked.

12.Save to File

When this button is pressed all the member details stored in the arraylist should be written to file named “MemberDetails.txt” as shown in the figure below:

[Hint:- You can use this string format as reference and adjust accordingly: String.format(“%-5s %-15s %-15s %-15s %-25s %-20s %-10s %-10s %-10s %- 15s %-10s %-15s %-15s %-15s\n”, “ID”, “Name”, “Location”, “Phone”, “Email”, “Membership Start Date”, “Plan”, “Price”, “Attendance”, “Loyalty Points”, “Active Status”, “Full Payment”, “Discount Amount”, “Net Amount Paid”); ]

13. Read from File

When this button is pressed, all the member details written in a text file should be read and displayed in a separate frame/panel in an organised format.

14

Additional Information to be included:

  • Retrieve the values from each text field by using the getText () method.
  • For numeric variables, extract the text from the text field, convert it to an integer, and return the result as a whole number.
  • Use try and catch blocks to handle potential Number Format Exception that may occur during the conversion of the string to an integer or double.
  • In case of successful operations, display an appropriate success message to the user using a message dialogue box.
  • In case of incorrect input, display an appropriate error message to the user using a message dialogue box.

Report (44 marks)

Your report should describe the process of development of your classes with:

a. A class diagram for each of the classes and a combined one showing the relationship among them. [5 marks]

b. Pseudocode for the methods of each class

[Note:- don’t include getter/setter methods] [8 marks] c. A short description of each method of the given classes. [8 marks]

d. You should give evidence (through inspection tables and appropriate screenshots) of the following testing that you carried out on your program:

Test 1: Compile and run the program using the command prompt/terminal. [1 mark] Test 2: Adding a regular member and a premium member respectively.[2 marks] Test 3: Test case for mark attendance and upgrade plan. [4 marks] Test 4: Test case for calculating discount, paying the due amount and reverting members. [4 marks]

Test 5: Test case for saving and reading from a file. ` [3 marks]

e. The report should contain a section on error detection and error correction, where you give examples and evidence of three errors encountered in your implementation. The errors (syntax, semantic or logical errors) should be distinctive and not of the same type. [3 marks]

f. The report should contain a conclusion, where you need to include the following things:

Evaluation of your work,

Reflection on what you learned from the assignment,

What difficulties do you encounter, and

How do you overcome the difficulties? [4 marks]

The report should include a title page (including your name and ID number), a table of contents (with page numbers), an introduction part that contains a brief about your work, and a listing of the code (in an appendix). Marks will also be awarded for the quality of writing and the presentation of the report. [3 marks]

If you are stressed about the coursework on CS4001NT Programming, then there is no need to worry now! Whether you need Programming Assignment Help or Marketing Assignment Help, you will get expert guidance and help on report writing services, which will make your concepts strong. We also provide you with free coursework solutions that will help you understand. And the best part? All the content is 100% original, written by PhD expert writers, and is well-researched, so that you get the best quality. So don't delay now, boost your grades with our help!

If you want to see the related solution of this brief then click here:-Programming

Workingment Unique Features

Hire Assignment Helper Today!


M30029 Advanced Thermodynamics and Fluid Mechanics Coursework Brief 2024-25 | UoP

The numerical values in this coursework are based on your student number. Your student number is a six- or seven-digit code UP QWERTYZ. In the assignment below, you should replace letters Q, W, E, R, T, Y, Z with digits from your student number.

MANG6046 Optimisation and Decision Modelling Individual Coursework Brief Sem 01 | UoS

This piece of work will count for 80% of the overall mark for MANG6046. You need to submit a report of your comment on a project and an Excel file (not multiple Excel files) in two separate folders (one is called Individual Coursework_Reports Only; the other is called Individual Coursework_Excel Files.

CTEC3754D Malware Analysis Coursework Brief 2024-25 | DMU

Evaluate malware evasive techniques, e.g., packing, obfuscation, and anti-disassembly. antis and pro-boxing, etc. and how to circumvent them. Investigate, select, and apply real malware through static and dynamic analyses using standard tools and techniques.

CMP7205 Applied Statistics—PG CWK Assignment Brief 2024-25 | BCU

CMP7205 Task: Report your statistical analysis on a reasonably complex dataset(s) in a professional manner, using appropriate probabilistic and/or statistical techniques implemented with modern statistical software.

Managing Customer Experience CW1 Summative Assessment Brief | BPP University

You are required to write a 2500-word report on the customer experience (referred to as CX from now on in this brief) strategy.

Leading Through Digital Change CWK Assessment Brief | BPP

In recent decades, businesses around the world have faced challenges by the persistent stream of disruptive digital innovations (DDI). T

Leading Through Digital Change Formative CW3 Brief - BPP

LTDC CW3 : A digital transformation strategy outlines how a company will utilise digital technology to continually develop novel products, services, processes, and channels of engagement (Pratt, 2023).

FY028 Inquiry Based Learning CW1 Assignment Brief June 2025 | BNU

FY028 Assignment task: For this assignment you will need to investigate the impact of technological trends on customer satisfaction at a small or medium-sized restaurant of your choice.

6020SSL: International Logistics CW1 Assignment Brief | CU

6020SSL: Analyse  and  critically  evaluate  a  range  of  logistics  practices  applied  across  different  industries  and geographical situations.  Examine  the  implications  of  inventory  holding  and replenishment  policy  when  considering  other  logistics functions and business constraints.

CC5067NI Smart Data Discovery Coursework 01 Question Paper Spring 2025 | LMU

Contract cheating (also known as assessment outsourcing, commissioning or ghost writing) is when someone seeks out another party, or an AI generator service, to produce work or buy an essay or assignment.

Online Assignment Help in UK