Computer Programming

https://www.seu.edu.sa/sites/ar/SitePages/images/logo.png

College of Computing and Informatics

Question One 1 Mark Learning Outcome(s): Design and appliance programs using aim oriented programming concepts such as encapsulation, bequest, polymorphism, formless systematizees and manners.

Provide the UML systematize diagram for the forthcoming program.

public interface Person {

}

systematize Ward {

}

Question Two 1.5 Marks Learning Outcome(s): Apply recursion concept in programming.

Write a Java program that:

· Asks the user to invade his/her pristine designate and ID.

· Prints the user's pristine designate and ID in counterexhibition prescribe after a while a immeasurableness betwixt them recursively.

Important notes:

1. You should possess to representation and paste the Java as your reply for this scrutiny. DON’T capture defend shot for your Java Code. It must be editable.

1. Take a defend shot for your output and paste it as a separate of your reply by using your own designate and ID.

The forthcoming are ins of the output:

Enter your pristine designate and ID:

Maha 1400586001

Your pristine designate and ID in counterexhibition prescribe:

1006850041 ahaM

Question Three 1.25 Marks Learning Outcome(s): LO1: Outline concepts such as bequest, polymorphism and reusability after a while distinctive pith on aim oriented programming. LO3: Design and appliance programs using aim oriented programming concepts such as encapsulation, bequest, polymorphism, formless systematizees and manners. (2.3)

Consider the forthcoming interface:

interface Something

{

boolean validate(int compute);

}

Classes that appliance “Something” interface can cogentate a peculiar compute in divergent behaviors after a whilein some tenor. For in, this interface could be profitable to program a candy dispenser agent to control whether the counterfeit inserted is a cogent counterfeit such as a district after a while a bisection of 2.426 centimeters. Also, it could be profitable to control if there is any candy advantageous to dispense.

a) Write two systematizees “Coin” and “Available” that appliances “Something” interface to accommodate the explained purposes. Hint: the wavering “value”, treated as the bisection of the counterfeit in the “Coin” systematize, and treated as the number of advantageous candies in the “Available” systematize.

b) Explain in your own articulation how this training helped you imply polymorphism and code-reuse concepts.

Question Four 1.25 Marks Learning Outcome(s): LO2Outline concepts such as bequest, polymorphism and reusability after a while distinctive pith on aim oriented programming. LO3: Design and appliance programs using aim oriented programming concepts such as encapsulation, bequest, polymorphism, formless systematizees and manners.

Consider the forthcoming systematize:

class Person

{

String designate;

int age;

Person(String designate, int age){

this.designate = designate;

this.age = age;

}

}

a) Write a java program after a while two systematizees “Teacher” and “Student” that enjoy the over systematize “Person”. Each systematize has three components: extra wavering, originator, and a manner to sculpture the ward or the instructor info. The output may observe approve the forthcoming (Hint: you may insufficiency to use “super” backwardness keyword in your applianceation):

My designate is: Ahmed

My age is: 35

My remuneration is: 8000

My designate is: Khalid

My age is: 12

My measure is: 6

b) Draw a UML diagram that shows super and subclasses after a while the analogy betwixt them.

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency