This question continues with this one posted now:
In the application class (main method), do the following Implement method addMember(): static void addMember(Member[] memberList, ref int nrEl) //Request the name of a member and adds that member to the list Implement the main method which contains the following: A declaration of an array of members, which can take 5 members A loop that adds 5 members to the array, using addMember() A loop that sets the points of the first two members to 30 A call to an array method to sort the objects in the array in ascending order of name A loop that uses displayMember() to display all the objects
Write a console application for a club to record their member information. For each member to need to store the member’s name and merit points. All new members starts with 0 merit points. Implement class Member which has private attributes for Name and Points. You need to create at a constructor method and the class also needs to have the following methods: public string getName() //Returns the name of the member public int getPoints() //Returns the points of the member public void setPoints(int P) //Sets the points of the member Open and edit your console application to handle the updated requirements. Update the Member class to include the following methods: public void diplayMember() //Display the name and points for a member int IComparable.CompareTo(object obj) //Used to sort the array in ascending order of name
Write a python program which checks whether the given number N is between 25 and 75.
The coordinates of a point are a pair of numbers that define its exact location on a two dimensional plane. Create a class named Coordinate that will represent a two dimensional point. Include two data fields for the x and y axis, a constructor that will require arguments to initialize the data values. Overload the + operator and - operator such that we can add, subtract, coordinates and return doubles, respectively. Write a main() that demonstrates that your class and function work correctly.
At the peak of COVID-19, most worker started working from home. Salaries of workers were reduced by 30%. Assuming income tax was also reduced by 50% from the previous rate of 15% and workers were paid on the number of hours worked in a month and each worker is supposed to work a total of 170 hours in a month. All overtime has been cancelled. If a worker does not meet the 170 hours’ threshold for a month, 5% is deducted from the salary. Assuming the hourly rate is GHC 10, Write a c++ program for the scenario narrated above. Your program should:
a) request for an employee’s name, the number of hours worked in a
month
b) define a function called payRole, your function should compute a
worker’s salary and income tax and any deductions if any
c) your program should display the results in “b” above.
d) explain the logic behind the code especially the function
The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number
of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a
neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical
shape. The objective of the puzzle is to move the entire stack to another rod, obeying the
following simple rules:
• Only one disk can be moved at a time.
• Each move consists of taking the upper disk from one of the stacks and placing it on top of
another stack.
• No disk may be placed on top of a smaller disk.
Design an iterative and recursive algorithm for above mathematical game.
You have to design your own Java console application about any valid problem that your application must solve. Your solution can include solving a business problem, a new idea or even a game. Your application must make use of concepts such as arrays, loops, inheritance, constructors and information hiding. Output must be shown in the form of a report using the console. In your solution, make use of as many concepts, and components dealt with in this course, but pay special attention to the following: Advanced arrays and Introduction to inheritance.