Does your exam require you to write pseudo-code at all? You don’t usually convert code to pseudo-code; you usually do it the other way round, so you might be doing something unnecessary.
Pseudo-code doesn’t have a fixed syntax or format, but you usually indent things which would be in a block and
You should give each method its own block of pseudo-code, without { ot anything. You can delineate blocks by unindenting and writing something like end. so the pseudo-code to print the contents of an array would look something like this:-
If that is a method you would add a heading like “Print all elements in array method”.
That’s good code, but I can see several possible improvements:
Look carefully at the method which searches for a customer. That will unnecessarily iterate the entire array, even if the customer is found at the first position. If there are duplicates, it will find the last entry.If you know how to use a List<Customer> rather than the array, that would be more efficient use of memory, rather than occupying 100000 locations, 99995 of them empty.You ought to close your writers in a finally block, like here.Learn about for-each loops (enhanced for loop) for iterating an array or List.The id field ought to have private access and you should be comparing equality with an overridden equals method in the Customer class. That would require overriding the hashCode method too.And welcome again