300581 programming techniques - write a java program that


Programming Techniques

Practical Pre-work

Complete the following exercises from the Gaddis textbook prior to your Week 8 practical class. You may check your answers against the answers published in vUWS. Discuss your solutions in the practical class with your tutor in week 8 if there are any that you don't understand.

Gaddis textbook Questions

i. Page 488 [522], Algorithm Workbench, Questions 3, 8
ii. Page 489 [523], Short Answer, Questions 2, 3, 5, 7

Week 8 Practical Exercises

During the Week 8 practical complete the following exercises using the Eclipse IDE to produce working Java code.

Coding Standards: When writing code in this unit you are required to adhere to the Coding Standards and General Principles as defined in the FAQ in vUWS. Your code for the following exercises should adopt these standards and general principles.

1. Write a Java program that will obtain 10 positive integers from the user via the keyboard; as the values are entered by the user store the values in an array. After the values have all been entered and stored in the array, process the array to determine the largest value, smallest value, and the average of the 10 values stored in the array. Your solution must incorporate appropriate methods.

2. Create a copy of your solution to question 1. Edit the copy of the program so that the input numbers are obtained from a text file named numbers.txt instead of from the keyboard. Use a text editor to create the numbers.txt file yourself. Place in the file any number of numbers and test your program. Test the program with different sized files with different sets of numbers. Make sure your code works correctly if the file isn't found, if it exists but doesn't have any data in it, or, if the file has too many values to fit into the array. Your solution must incorporate appropriate methods.

Optional MyProgrammingLab Exercises

These exercises are completely optional. To complete the following exercises you will need to have registered for the Programming Techniques course in MyProgrammingLab. Instructions to register for MyProgrammingLab are published in the "MyProgrammingLab Registration" document that can be found in the "Getting Started" link in vUWS.

To register you will need a MyProgrammingLab access code (comes with the Value Pack version of the text book or can be purchased separately online as part of the registration process) and you should use the ‘Course ID' or ‘Section Access Code' UOFW-29746-XYMH-34

A. Requirements

For each question listed in section B you must

a) use the name for the class file(s) as identified in the question
b) include your authorship details at the top of the file in code comments (see item 3.1 in Section C of this document for details)
c) adhere to the coding standard as identified in the Google Java Style Guide (see Section C of this document for details)
d) reference all sources that you used for inspiration of your solution as per
Section D of this document
e) Ensure that your java code compiles and runs in Eclipse 4.5.3 (Neon.3)

B. Questions

Complete the following questions using the Eclipse IDE to produce working Java code files.
1) Question: Exercise 1 from Week 7 Practical Exercises (Car Class including the additional requirements)
Name of Class File: The name of the Java class for this question is to be Car_studentid where studentid is your student ID. The main program file for this question is to be CarDemo_studentid where studentid is your student ID

This program must be demonstrated to your class tutor for the checkpoint in week 8.

This question will contribute 30% of the marks for Prac Set 2.

Weight of Marking Criteria in this question (refer to pages 9-11 of section 2.5.1 in the Learning Guide for details of the Marking Criteria and Standards)

Code Compilation:

10

Algorithm

15

Identifier

10


 

%

Selection:

%

Use:

%

Code

45

Code

10

Code

10

Functionality/Correctness:

%

Documentatio

%

Readability:

%

 

 

n:

 

 

 

2) Question: Exercise 2 from Week 8 Practical Exercises
Name of Class File: The name of the Java class for this question is to be
Numbers_studentid where studentid is your student ID.

This question will contribute 30% of the marks for Prac Set 2.

Weight of Marking Criteria in this question (refer to pages 9-11 of section 2.5.1 in the Learning Guide for details of the Marking Criteria and Standards)

Code Compilation:

10

%

Algorithm Selection:

10

%

Identifier Use:

10

%

Code

50

Code

10

Code

10

Functionality/Correctness:

%

Documentatio

%

Readability:

%

 

 

n:

 

 

 

3) Question: Exercise 4 from Week 7 Practical Exercises
Name of Class File: The name of the Java class for this question is to be
Membership_studentid where studentid is your student ID.

This question will contribute 40% of the marks for Prac Set 2.

Weight of Marking Criteria in this question (refer to pages 9-11 of section 2.5.1 in the Learning Guide for details of the Marking Criteria and Standards)

Code Compilation:

10

%

Algorithm Selection:

10

%

Identifier Use:

10

%

Code

50

Code

10

Code

10

Functionality/Correctness:

%

Documentatio

%

Readability:

%

 

 

n:

 

 

 

C. Google Java Style Guide
All questions in this Prac Set must adhere to the following listed coding standards as defined in the Google Java Style Guide

Style Guide Item Number

Changes to

Modification

2.1 to 2.3

2.1 modified

2.1 - File Name: The source file name consists of the case-sensitive name of the top-level class it contains as identified in the question, plus an underscore, plus the student ID, plus the .java extension

Example: Retail_12345678.java

3.1 to 3.4.1

3.1 modified

3.1 - License Info is replaced by Authorship

information

All java source files must contain the authorship information as follows:

Student ID: Name: Campus: Tutor Name: Class Day: Class Time:

4.1 to 4.7,

NIL

 

4.8.2.1 to

 

4.8.2.3,

 

4.8.4 to

 

4.8.4.3,

 

4.8.6

 

5, 5.1 to 5.3

NIL

 

Attachment:- Prac_Larger.zip

Solution Preview :

Prepared by a verified Expert
Programming Languages: 300581 programming techniques - write a java program that
Reference No:- TGS02443928

Now Priced at $25 (50% Discount)

Recommended (96%)

Rated (4.8/5)