Chapter 1 - Introduction Flashcards

1
Q

Why do we write programs?

A

To solve a problem. They are hiring STEM majors by other disciplines b/c they solve problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What makes you better at solving problems?

A

Solving problems. We can train someone in a subject matter if they can already solve problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do we solve problems? 5 steps?

A

1) Understand the problem (MOST IMPORTANT)
2) We design the solution (b/c we like reusable solutions)
3) Multiple designs (competing)
4) Coding/Implementing the solution (this class)
5) Testing the solution (gets overlooked in academic environment. We need to do our own tests).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Solving problems is a waterfall or simultaneous?

A

It’s simultaneous (different than engineering). It can be a painful process if you are working in a group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the KEY in being successful in software engineering.

A

Breaking down the program into SMALLER manageable pieces. You’re going to spend most of your time on the smaller pieces of the program. THIS way you can.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does having small modules help?

A

It helps by creating well dedicated portions of a program, you get reusable code to use elsewhere.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the key piece of Object Oriented Languages and design?

A

It’s software reusability, especially with objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 2 broad issues we run into?

A

1) Syntax (there is a lot more syntax requirements than python). In java they are all over the place. Java does not care about indentation (unlike Python). We will want to use good style (nicely indented, java style guidelines, white space).
2) Semantics (Logic): A program that is correct syntactically doesn’t always do what we ask of them. Semantic errors are harder to fix.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which errors are easier to fix?

A

Syntax is easier, semantics is harder to capture, which can be very subtle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

PROJECT: Calculate the change? Why did 50% not succeed?

A

Insufficient testing. Boundary testing. Type issues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 4 different kinds of errors?

A

1) Syntax: (COMPILE ERROR)
2) Semantics Errors: Wrong words, that don’t have a meaningful definition. (COMPILE ERROR).
3) Execution error (after the .class file is created it might not be easy).
4) Output is not what it should be (intent error).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the hardest error to fix?

A

Intent error, because it looks like everything is working properly. There are an infinite number of INPUT VALUES. Hopefully we will TEST well.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How much level of confidence do we need to release the product?

A

It depends. If its for robotics surgery, it has to be pretty high. If its a video game then a few glitches is fine, since its more important that we release it timely with regards to marketing. This is the same with HW vs Projects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the THREE KEY terms?

A

Classes, methods, and statements?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Where will the program always start?

A

MAIN method. That’s what the system will always start with. The main method tells the CPU to compute Lincoln 1. And Lincoln1 may say to run Lincoln2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does “src” stand for?

A

Source file (I can drag these files to Eclipse src. Link them). When I transfer and get a default package.

17
Q

For Java programs how many PUBLIC classes do you need to have? Does it have to match your source name.

A

At least 1. Yes. The PUBLIC class has to match the file name.

18
Q

What are classes?

A

Classes are blocks of code. Their purpose is to identify chunks of codes.

19
Q

Can you call a class from another package/source file?

A

No, but you can call a method from another class. You can’t execute a class, but you can execute a method within a class.

20
Q

What are STATEMENTS?

A

They are executable code that is within a class.

21
Q

What is the println method?

A

It prints the line separately.

22
Q

Where do we care about efficiencies?

A

Execution cycles are where you achieve efficiency (don’t care about white space). With large programs these can make a big difference. Google is all about this.

23
Q

Author block

Method comment block.

A

Name of the file, authorship, and brief description of the program.

Each method needs to have a comment block before.

24
Q

What is a class header (and body)?

A

Abelincoln (constants are ALLCAPS)

25
Q

What is a method header (and body)? How about visibility (public or not)?

A

AbeLincoln (methods + variables)