Securing Higher Grades Costing Your Pocket? FLAT 25% OFF on all orders
loader

Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Add File

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!

Stuck on Your Question?

Get 24x7 live help from our Top Tutors. All subjects covered.

Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

loader
250 words

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Students Who Viewed This Also Studied

60 Pages
Software Testing and Analysis Technique

Task 2: Software Testing and Analysis Technique The selected version as the subject for testing https://github.com/microsoft/calculator Review of the Testing tools to be used Zaptest ...

Course

CSCI926

Subject

Programing

University

University of Wollongong

Season

Fall

14 Pages
ITEC217 Programming Concepts

Task: Building a larger Unit Assignment Marks Tracking software system Instructions You need to do this project in a group with a maximum of 3 members. Unlike previous practicals, this is a much big ...

Course

ITEC217

Subject

Programing

University

Australian Catholic University

14 Pages
7175 Web Design and Programming

Task: Question 1 [3 marks]: Use the HTML document below and add your CSS to the internal style sheet between <style> and </style> to display the HTML page on browser as seen below. The im ...

Course

7175

Type

Programming

Subject

Programing

University

University Of Canberra

Season

Autumn

8 Pages
ISBS202 Programming Concepts

Task: Assessment   The report worth 20% will include defining diagram, control structures required, pseudocode of the proposed algorithm, and desk checking based on addressing issues with a tradit ...

Course

ISBS202

Type

Programming

Subject

Programing

University

Canterbury Institute of Management

ICT167 Principles of computer science

Question

Answered

Assignment 1 uses O-O design implemented in Java. You will need to use a user-defined class, as an array of such class objects will be required. User-defined Class: You will design and implement your own data class. The class will store data that has been read as user input from the keyboard (see Getting Input below), and provide necessary operations. As the data stored relates to monetary change, the class should be named Change. The class requires at least 2 instance variables for the name of a person and the coin change amount to be given to that person. You may also wish to use 5 instance variables to represent amounts for each of the 5 coin denominations (see Client Class below). There should be no need for more than these instance variables. However, if you wish to use more instance variables, you must provide legitimate justification for their usage in the internal and external documentation. Your class will need to have at least a default constructor, and a constructor with two parameters: one parameter being a name and the other a coin amount. Your class should also provide appropriate get and set methods for client usage. Other methods may be provided as needed. However, make sure they are necessary for good class design; you must provide legitimate justification for their usage in the internal and external documentation. In particular, your class should NOT include Input and Output methods. The only way to get data out of a data class object to the client program is to use an appropriate get method. The data class methods must not write data out. Data should be entered into a data class object via a constructor or an appropriate set method. When designing your Change class, use an UML class diagram to help understand what the class design needs. Getting Input: Input for the client program will come from keyboard (entered by the user). The input should consist of: the name of a person, and a coin value (as an integer). The program should validate the input coin value to ensure that it is in the range 5 to 95, and is evenly divisible by 5. Names are one-word strings. You should ask the user to enter the required information using a loop with a question after each loop iteration to check if the user wants to end the input of data. It is recommended for the user to input at least 9 such data – this can be conveyed to the user using a message before entering the loop. NOTE: for the purpose of testing the program by your tutor, you should provide a method in the client class that hardcodes data into at least 9 Change objects and stores these objects into the array provided by your program. In this case, your tutor would not need to manually key in the data to test the program when assessing your work. Thus, you should provide a call to this method (commented out) in the main function; this can be uncommented by your tutor as needed. Page 2 of 7 Example of inputs as follows: Recommendation: Please enter at least 9 records to test the program. Please enter the name of the person: Jane Please enter the coin value for the person (range 5 to 95, multiple of 5): 30 Do you have more person to enter (Y/N): Y Please enter the name of the person: John Please enter the coin value for the person (range 5 to 95, multiple of 5): 50 Do you have more person to enter (Y/N): Y Please enter the name of the person: Fred Please enter the coin value for the person (range 5 to 95, multiple of 5): 94 Incorrect coin value. Must be in the range 5 to 95, and multiple of 5. Please enter the name of the person: Wilma Please enter the coin value for the person (range 5 to 95, multiple of 5): 100 Incorrect coin value. Must be in the range 5 to 95, and multiple of 5. Please enter the name of the person: Jane Please enter the coin value for the person (range 5 to 95, multiple of 5): 35 Do you have more person to enter (Y/N): Y ... (assuming this is repeated at least 9 times) Do you have more person to enter (Y/N): N ... (go out of the loop) Page 3 of 7 Client Class: The client program should read the input data from the user (or the method with hardcoded inputs) and use the Change class to store the data entered. This data should be stored in a Change class object. You will need a data structure to store the Change class objects according to the number of persons entered. Thus, you are to utilize an array of Change objects. Do not use ArrayList for this assignment. It should be noted that it is possible to have the same name entered numerous times, but the coin values for such repetitions could be different. When the name is the same, it would mean the same individual, and your program should add up the coin amounts to obtain a total amount for that individual; this should be performed before computing the change to be given. Note that in this scenario, the total amount for an individual may end up being over 100, 200, 300, or more cents. Make sure you have hardcoded test cases of the above for your tutor to test for these situations. Processing would involve determining repeated names and accumulating the total for those repeated names. You must ensure that there are no objects with repeated names in the array. Then methods would need to be called to calculate the required output corresponding to the coin amounts stored in the array of objects. Output change values must consist of the following denominations: $1, 50 cent, 20 cent, 10 cent and 5 cent coins. The program should aim to give as much of the higher valued coins as possible. A poor solution for an input of 30 cents is to give six 5 cent coins. The better solution is to give a 20 cent coin and a 10 cent coin. Once the data input has been completed, your program should then display a menu screen as illustrated below. The program will continue to show the menu and execute the menu options until "Exit" is selected by entering the value 5 at the menu prompt. 1. Enter a name and display change to be given for each denomination 2. Find the name with the smallest amount and display change to be given for each denomination 3. Find the name with the largest amount and display change to be given for each denomination 4. Calculate and display the largest number of coin denomination, and the total number of the coin 5. Exit When the user enters the value 1 at the menu prompt, your program will ask for a name. As an example, if the user enters the name Jane (as in the example input above), the program will output: Customer: Jane 165 cent Change: $1: 1 50 cent: 1 10 cent: 1 5 cent: 1 N.B. change values of 0 are not shown for screen output. Page 4 of 7 If the user enters a non-existent name (eg: Donald) at menu option 1, which would therefore not be in the array of objects, your program will print: Name: Donald Not found After processing the output for menu option 1, the menu is re-displayed. When the user enters 2 at the menu prompt, your program will search all objects in the array to find the object with the smallest coin amount. Then the program will output the name for the person, and the denomination breakdown of their change. If there is more than one person who are having equal smallest coin amount, just return the first person found in the array. After processing the output for menu option 2, the menu is re-displayed. When the user enters 3 at the menu prompt, your program will search all objects in the array to find the object with the largest coin amount. Then the program will output the name for the person, and the denomination breakdown of their change. If there is more than one person who are having equal largest coin amount, just return the first person found in the array. After processing the output for menu option 3, the menu is re-displayed. When the user enters 4 at the menu prompt, your program will access all objects in the array to calculate and display only the largest number of coin denomination, and the total number of coins for the largest denomination. If there are more than one coin denominations having equal amount, you will need to list down all of them. After processing the output for menu option 4, the menu is re-displayed. For example: Customer: Jane 165 cent Change: $1: 1 50 cent: 1 10 cent: 1 5 cent: 1 Customer: John 125 cent Change: $1: 1 20 cent: 1 5 cent: 1 Menu option 4 should return as follows. The largest number of coin denomination is: $1 5 cent Page 5 of 7 The total number of $1 coin is: 2 The total number of 5 cent coin is: 2 When the user enters 5 at the menu prompt, your program will write an appropriate farewell message to screen and exit. The client program requires the submission of a structure chart, a high-level algorithm and low-level algorithm (i.e. suitable de-compositions of each step in the high-level algorithm). Important Points: You need to provide a test plan to fully test your algorithm and program. As well as keyboard input, do not forget to provide a method in the client class that hardcodes data into at least 9 Change objects and stores these objects into the array provided by your program. Think carefully about how to construct this test data. If done well, you should be able to do nearly all required testing with this set of test data. Your solution (user-defined class, client class program and algorithm) should be modular in design. For methods, use a high cohesion and low coupling design approach. These principles will also demonstrate good code re-use if done properly. Note that for this problem, the principle of code re-use is particularly important and a significant number of marks are allocated to this. You should attempt to design your solution such that it consists of a relatively small number of methods that are as general in design as possible, and you should have methods that can be re-used (called repeatedly) in order to solve the majority of the problem (actual calculations). If you find that you have developed a large number of methods where each performs a similar task, OR there is a lot of code that is repeated in the methods, then attempt to analyse your design to generalise the logic so that you have just one general version of required methods. Be mindful of the cohesion exhibited by a method. If you have a method that is doing more than one task, then cohesion is low, and you will need to re-design it to have high cohesion. Distribution of marks for assessment For the programming question, an approximate distribution of marks for assessment is given below. The question will be marked out of 100 as follows: • Correct solution design (class and method) and implementation: 50 marks • Programming style (internal documentation (comments), use of methods, parameters, readability, presentation of output etc.): 25 marks • External Documentation (problem specification, algorithm, program limitations, program listings, program test strategy, and test results, etc.): 25 marks For internal documentation (i.e. in the source code) we require: • A beginning comment clearly stating title, author, date, file name, purpose and any assumptions or conditions on the form of input and expected output; • Other comments giving useful low-level documentation and describing each component (eg: method pre- and post-conditions); Page 6 of 7 • Well-formatted readable code with meaningful identifier names and blank lines between components (like methods and classes). The program should also include a method (eg: StudentInfo( )) to output your student details (name, student number, mode of enrolment, tutor name, tutorial attendance day and time) to the screen before the input data is read in. Required External Documentation for each question: 1. Title: a paragraph clearly stating title, author, date, file names, and one-line statement of purpose. 2. Requirements/Specification: a paragraph giving a brief account of what the program is supposed to do. State any assumptions or conditions on the form of input and expected output. 3. User Guide: include clear instructions on how to compile and run the program, and how to use the program during execution. 4. Structure/Design/Algorithm: Outline the design of your program (it is here that you will need to justify any extra instance variables and class methods that you have included in Change class). Give a written description, use diagrams (UML class diagram and structure chart), and use pseudocode for algorithm. 5. Limitations: Describe program shortfalls (if any) e.g.: the features asked for but not implemented the situations it cannot handle, etc. 6. Testing: describe your testing strategy (the more systematic, the better) and any errors noticed. Provide a copy of your results of testing in a document saved in Word format. Note that a copy of the sample test data and results from a program run for each program is required (copy from the program output window and paste to a Word file). Your submitted test results should demonstrate a thorough testing of the program. 7. Source program listings: save all your Java source code in a document in MS Word format. All of the external documentation for the question must be included in the above order saved in a file in MS Word format. Your final external documentation submission should be prepared as a single Word document containing each of the questions in order and each section within these also in order. It is also necessary to submit the Java source code and compiled version of your program (i.e. all classes that you have designed and implemented). You should develop the program using the NetBeans IDE. It will make it easy to collect sample output. The whole NetBeans project should be submitted. The external documentation together with the source code files and compiled versions for the question must be compressed in a .zip file before submitting. Note that the whole NetBeans project folders is zipped. Make sure that all necessary files are submitted so that the programs can be viewed, compiled and run successfully. The final versions of the programs should compile and run under Java SE (JDK). Internal students should test compilation and running on the University lab machines.

ICT167 Principles of computer science

Answer in Detail

Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

56 More Pages to Come in This Document. Get access to the complete answer.

More ICT167 ICT167 Principles of computer science: Questions & Answers

Q
icon

We aren't endorsed by this University

Software Testing and Analysis Technique

Task 2: Software Testing and Analysis Technique The selected version as the subject for testing https://github.com/microsoft/calculator Review of the Testing tools to be used Zaptest The Zaptest is an automated software testing tool that are used by organization developing applica ...

View Answer
Q
icon

We aren't endorsed by this University

ITEC217 Programming Concepts

Task: Building a larger Unit Assignment Marks Tracking software system Instructions You need to do this project in a group with a maximum of 3 members. Unlike previous practicals, this is a much bigger assessment and group work, so start as early as possible as leaving to the last few days won't w ...

View Answer
Q
icon

We aren't endorsed by this University

7175 Web Design and Programming

Task: Question 1 [3 marks]: Use the HTML document below and add your CSS to the internal style sheet between <style> and </style> to display the HTML page on browser as seen below. The image file is pasta.jpg in Assignment 1. Please do not change HTML elements and do not add anything el ...

View Answer
Q
icon

We aren't endorsed by this University

ISBS202 Programming Concepts

Task: Assessment   The report worth 20% will include defining diagram, control structures required, pseudocode of the proposed algorithm, and desk checking based on addressing issues with a traditional business problem.    As part of the assignment your group will have to present your work i ...

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.io then please raise the content removal request.

Choose Our Best Expert to Help You

icon

5% Cashback

On APP - grab it while it lasts!

Download app now (or) Scan the QR code

*Offer eligible for first 3 orders ordered through app!

screener
ribbon
callback request mobile Chat Now
Have any Query?
close
Subtraction Payment required!

Only one step away from your solution of order no.