answersLogoWhite

0


Best Answer

package collection; import java.util.List; import java.util.Vector; class Producer implements Runnable { private List list; public Producer(List pList) { list = pList; } publicvoid run() { System.out.println("Producer started"); for (int i = 0; i < 50; i++) { list.add(Integer.toString(i)); } System.out.println("Producer completed"); } } classConsumer implements Runnable { private List list; public Consumer(List pList) { list = pList; } publicvoid run() { System.out.println("Consumer started"); for (int i = 0; i < 50; i++) { while(!list.remove(Integer.toString(i))) { // Just } } } } public class VectorSyncEx { publicstatic void main(String[] args) throwsInterruptedException { List list = new Vector(); //List list = new ArrayList(); for (int i = 0; i < 10; i++) { Thread p1 = new Thread(new Producer(list)); p1.start(); } for (int i = 0; i < 10; i++) { Thread c1 = new Thread(new Consumer(list)); c1.start(); } System.out.println(list.size()); } } Try running the program with ArrayList. You can see a number of ArrayIndexOutOfBoundException, Consumer threads will still keep waiting for more elements which wont be added because the Producer has terminated after throwing the Exception

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Design is the description of the logic used to solve the problem. Coding is the language/machine specific implementation of the design which runs on the computer and, hopefully, provides the expected result.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between software design and the coding?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between BS computer science and BE computer systems degrees?

A Bachelor of Science in Computer Science focuses on things like programming and coding. A Bachelor of Engineering in Computer Systems focuses the design of computer and software systems. The latter stresses design and the former stresses implementation.


How software is created?

Software creation requires different phases of software development life cycle. These are: Requirement analysis and specification Design Coding Testing Operation and maintenance


What is the difference between srs document and design document?

SRS is about "what is needed" i.e. what software should do! Design docuemnt is about how Developer will achieve specified SRS.


What's the difference in software between PE Design version 7 and version 8?

The lite version does not have file exporting.


How do you design game?

Its require a good command on 3d softwares, photoshop, Coding softwares, illustrator and other graphics related software.


. Do you design software when you write a program What makes software design different from coding?

That's like asking "Do you design building plans when you create a shed?" Sure, you could just start nailing things together, but if you want a solid structure you will want to plan it out beforehand.


What is the difference between cad and auto cad and which one is better?

CAD is the generic name for all Computer Aided Design and Draughting software. Autocad is the most popular software provider.


Software life cycle model?

Feasibility, cost-benefit analysis Architecture Design Coding Testing (General, Regression, Integration) Maintenance


Difference between detailed design and system design?

tylrfjlcfjghssddhl'


Where can one find a design website software?

Learn how to create a website using software. We have wide collection of software to manage and host your beautiful website. No coding skill is required, only drag and drop features with latest technologies.


What is the difference between design and technique.?

The difference between design and technique is quite elaborate. Design is the development and documentation of an idea while technique is the strategy that is used to do something.


What is the Difference between Computer Aided Design and conventional design?

We do conventional designs that are available as a sketch, a detailed plan drawn to scale, and we can show a rendered design on larger projects. Computer aided design utilizes the latest in software innovation to produce spectacular results.