EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
Java代写
您的位置: 主页 > 编程案例 > Java代写 >
代写Java:Data Structure代写 | CharList API string - Java代写
发布时间:2021-07-25 20:47:42浏览次数:
*java作业加急Overview*This assignment will require you to write a class to represent* a resizable array of characters. It should act much like a String.* Unlike a String however, the characters can be changed or deleted* directly.**To make your life easier you will be provided with an API* specification (just like the JavaDocs you use for your* programming). Your job is to follow this API to fill out the* method stubs with appropriate code. You should also ensure that* this code is uncrashable. If your code detects faulty/incorrect* input it should handle it as instructed in the Javadoc comments.**Data Structure*We will be storing chars into an array within the CharList* class. Something to note is that arrays are immutable (They cannot* be changed once they are created.) A large part of this assignment* is to add methods to the CharList class to simulate an array that* is mutable. These methods should allow adding and deleting* chars from the array and changing the array s size. Your array* must always be exactly the size necessary to fit all the* characters. There must be no null chars on the end.***How To Do The Assignment*We suggest you write your code in the order that the methods* appear in. The most independent methods are listed first.***In general, you may not use methods from other classes. The only* exceptions are string.length() may be used in your constructor and* Character.toUpperCase(c) may be used in the toTitleCase() method.* The use of any other methods may result in a loss of marks.**For details on what you are actually being marked on, please* check the Marking Criteria section of the Assignment Specification.**/public class CharList {/*** Array to store chars*/private char[] characters = null;/*** The instance variable characters will be initialized* to length 0.*/public CharList(){//TODO;this.characters = new characters[0];}/*** The instance variable characters will be initialized to the* same length and contain the same characters as the argument* String. If the argument is null, the characters array will be* length 0.* @param other The String to copy.*/public CharList(String other){//TODO Write this method as described above then delete this comment}/*** The instance variable characters will be initialized to the* same length and contain the same characters as the argument* CharList. If the argument is null, the characters array will* be length 0.* @param other the CharList to copy*/public CharList(CharList other){//TODO Write this method as described above then delete this comment}/*** Returns the number of non-null characters in the instance* variable. Do not count null chars ( ).* @return The length of the String*/public int length(){//TODO Write this method as described above then delete this commentreturn -1;}/*** Compares to CharLists returning true if they contain the same* chars and are the same length.* @param other presumed to be a CharList. Must type-cast to* CharList if it is an instance of this class.* @return true if both arrays contain the same chars and* are the same length.*/@Overridepublic boolean equals(Object other){//TODO Write this method as described above then delete this commentreturn false;}/*** Return the char at the argument index from the characters array.* @param index the position of the char to return.* @return The char at the given index or if no char is* available.*/public char charAt(int index){//TODO Write this method as described above then delete this commentreturn }/*** Returns a new, deep-copy of the instance variable.* You must use a loop to copy the characters into a new array.* @return A char array copy of the instance variable, characters.*/public char[] toCharArray(){//TODO Write this method as described above then delete this commentreturn null;}/*** Returns a copy of the instance variable as a String.* You must use a loop to copy the characters into a String.* @return String representation of the instance variable,* characters.*/@Overridepublic String toString(){//TODO Write this method as described above then delete this commentreturn null;}/*** Adds each character from the argument CharList to the end of* this CharList s characters. The resulting array will replace* this CharList s instance variable.* @param other The CharList to append.*/public void append(CharList other){//TODO Write this method as described above then delete this comment}/*** Adds each character from the argument CharList to the start of* this CharList s characters. The resulting array will replace* this CharList s instance variable.* @param other The CharList to prepend.*/public void prepend(CharList other){//TODO Write this method as described above then delete this comment}/*** Adds each character from the argument CharList into this* CharList s at the specified index. All characters at that* index or beyond will be pushed to the end.** If the specified index is equal to the length, it will add* the characters to the end of the array. If the specified* index is less than 0 or greater than the length, this method* does nothing.* @param other The CharList to insert.* @param index The position to insert at.*/public void insert(CharList other, int index){//TODO Write this method as described above then delete this comment}/*** Returns the substring in the range from start up to and* excluding end.*Examples:*

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。