Ask Programming Language Expert

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

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92457099
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Programming Language

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As