Question: Explain, briefly, how you completed this exercise, the algorithm you used (via pseudo code or other description tools), the major issues you faced, and how
Explain, briefly, how you completed this exercise, the algorithm you used (via pseudo code or other description tools), the major issues you faced, and how you solved them.
The included netbeans code is the start and it needs completed to get an output like the sample screenshot included (U10D1_InstantiateUseArrayOfObjects.zip) and load it into your NetBeans IDE.
The project defines two classes:
A Java class called Course (in Course.java) with certain attributes, and
Another class called U10D1_InstantiateUseArrayOfObjects (in U10D1_InstantiateUseArrayOfObjects.java). This class creates an array of Course objects and initializes their attributes to specific values and then calls the WriteCurrentRegistration() to print the current list of registered classes and their total credit hours. The WriteCurrentRegistration() still needs to be coded.
This is a screenshot of the course.Java code

Code the WriteCurrentRegistration() method to meet the stated requirements specified in the project. The start of the code is below:
package u10d1_instantiateusearrayofobjects;
/** * * @author */ public class U10D1_InstantiateUseArrayOfObjects {
/** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Course[] courses = { new Course("IT1006", 6, false), new Course("IT4782", 3, false), new Course("IT4789", 3, false), new Course("IT4079", 6, false), new Course("IT2230", 3, true), new Course("IT3345", 3, true), new Course("IT2249", 6, false) }; WriteCurrentRegistration(courses); } //This method prints the current list of registered courses thus far //from the courses array separated by , and enclosed inside { } //It also prints the total credit registered for thus far public static void WriteCurrentRegistration(Course[] courses) {
//TODO: //loop over the courses array and print //the current list of registered courses //separated by , and enclosed inside { } //Also, print the total credit registered for } }
A sample output:

Explain, briefly, how you completed this exercise, the algorithm you used (via pseudo code or other description tools), the major issues you faced, and how you solved them.
1package ulodl_instantiateusearrayofobjects: @author omora public class Course private String code ""; private int creditHour 0; private boolean isRegisterdFor false; public Course (String code, int creditHour, boolean isRegistered this. code = code ; this. creditHour = creditHour; this.isRegisterdFor = 1sRegisteredFor; public void setcode (String code) this. code = code ; public String getcode) return this.code public void setcrditHour (int creditHour) i this. creditHour = creditHour ; public int getcreditHour ) return this.creditHour; public void setIsRegisteredFor (boolean trueOrFalse)i this.isRegisterdFor = trueOrFalse; public boolean getIsRegisteredFor) f return this.isRegisterdFor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
