top of page

ECS Building Defense - Java project help

Updated: Dec 28, 2021

What is Java?

Java is a general-purpose, class-based, object-oriented programming language designed for having lesser implementation dependencies. It is a computing platform for application development. Java is fast, secure, and reliable, therefore. It is widely used for developing Java applications in laptops, data centers, game consoles, scientific supercomputers, cell phones, etc.


What is object-oriented programming?

Object-oriented programming (OOP) is a programming paradigm based on the concept of objects which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods)


Some important features of object-oriented programming

  1. Encapsulation

  2. Abstraction

  3. Polymorphism

  4. Inheritance

Java project work:

Your task is to implement the specification as written.


The ECS Building Defence simulates the team of students to defence against waves of (programming) bugs. There are a number of concepts, people, and procedures that contribute to this simulation. For our purposes these include:


Students: The different students that join the Team and defence the building against the bugs.

Bugs: The (software) bugs that attack the building with the purpose of getting to the top of the building.

Teams: The team of students to defence against the bugs.

Buildings: The buildings for which the student team defence against the bugs. Each building has several floors.


A list of students participated in our simulation are listed in. The columns list the base attributes for students, i.e., attack and delay of the different students.

  • Attack – the student’s attacker power. The higher a student’s attack power, the more damage that the student will deal to the bugs.

  • Delay – the student’s delay (cool-down) duration. A student with a lower delay duration will use the special ability more often.

The list of programming bugs to be considered in this coursework is in Table 2. The columns list the base attributes for bugs, i.e., their hit points (HP) and the number of steps for the different bugs.

  • HP – the bug’s hit points. A bug’s is alive if and only if their hit points is positive. We will often use HP as a short-hand for hit points.

  • Steps – the number of steps required for a bug to move to the next floor. The smaller the number of steps, the faster the bug to go up the building.

Part 1 – The Bug classes

Create a package called bugs. All classes developed in this part must be in this package.

Define this as you think appropriate, and create a constructor that initializes the Bug class

To model different types of bugs, you will use inheritance create three classes (in the bugs package), namely ConcurrentModificationBug,NoneTerminationBug, NullPointerBug, all of which inherit from the Bug class. For each of these new class, create a constructor that have parameters for the bug’s name, the bug’s level, and the bug’s initial steps,


BY THIS STAGE you should have a package contains a Bug class, and the subclasses of Bug: NullPointerBug, ConcurrentModificationBug, and NoneTermination.


You can now test your Bug and its subclasses by creating a main method and to create some objects of these classes.


Part 2 – The Building class

Create a package called building. All classes developed in this part must be in this package. Define this as you think appropriate, and create a constructor that initializes the Building class. BY THIS STAGE you should have the Building class connected to the Bug class. You can now test your new Building class by creating a main method and to create some a Building objects.


Part 3 – The Students classes

Create a package called students. All classes developed in this part must be in this package. Define this as you think appropriate, and create a constructor that initializes the Students class


The first step in this part is to create is an interface that represents a Student. The

Student interface (in the students package) will be the basis for the students in

different programmes. Define the signature of the methods as appropriated. As a part of defending a building, every student will use either a normal attack or a special ability. The student will use the special attack when their delay is over.


To model students in different programmes, you will use inheritance. The base attributes for the different students are in Table 1. Create four classes (in the students package), namely AiStudent, CsStudent, CyberStudent, SeStudent, all of which implement the Student interface.


Each type of students has their own special attack as described below.

  • AiStudent – The Artificial Intelligence students’ special ability of using machine learning and will cause damage to the first 3 bugs (those closest to the top of the building).

  • CsStudent – The Computer Science students’ special ability of pair programming and will cause 4 times the normal damage.

  • CyberStudent – The Cyber Security students’ special ability of setting up antivirus software with a chance of instantly remove the first bug. The probability of instant removal is “level + 20”, where level is the current level of the student, but cannot be more than 50. In the case where the student cannot remove the bug instantly, it causes double the normal damage to the bug.

  • SeStudent – The Software Engineering students’ special ability of group working and will cause slown down the first 5 bugs by 2 steps.

BY THIS STAGE you should have the first interface Student and the implementation of Student: AiStudent, CsStudent, CyberStudent, and SeStudent.


You can now test your new Student and its implementation classes by creating extending your current test from previous section,


Part 4 – The Team class

The team manages a group of students and manage the knowledge points gain during the defence of the,building. Create a Team class (in the students package) and add a constructor with an appropriate parameter representing the initial knowledge points for the team. Implement a getter method getKnowledgePoints to return the current the team’s current knowledge points. Define appropriate properties to store the collection of students in the team and a getter method getStudents to return the students as an array of students.

BY THIS STAGE you should have implemented the Team class.


Part 5 – Battle

Our simulation will contain a battle between the student team and waves of bugs attacking the building. You should create a new class called Battle (do not use package for this class). It should have a Team and a Building instance, which should be initialised from a constructor Battle(Team, Building).


BY THIS STAGE you should have implemented Battle class, connected to a Team and a

Building.


You can now test your new Battle class by extending the test from the previous section and connect a Team and a Building.


Part 6 – ECS Building Defence

In this part we implement the game where to defence ECS building against the bugs. You will need to use your file handling methods as well as split strings into different component parts. Create a battle between a Team and a Building.

You can now test your main method


How does CodersArts help you in Java coding?

CodersArts provide :

  • Java assignment Help

  • Help in Java development Projects

  • Mentorship from Experts Live 1:1 session

  • Course and Project completions

  • CourseWork help


bottom of page