1 Creates a HomeworkAssignment class 2 instantiates two objects The provided file has 3 and prompts the user for information about two courses syntax and/or logical 4ing static System.Console; errors. Determine the 5 ass DebugNinel problem(s) and fix the 7 static void Main() 8 { HomeworkAssignment coursel = new HomeworkAssignment(); HomeworkAssignment course2 = new HomeworkAssignment(); program. 10 11 12 13 string entryString; int exercises; // Get info for first class Write("What class do you have homework for? "); 14 15 16 entry = ReadLine(); 17 18 19 20 coursel.className = entryString; Write("How many exercises must you complete? "); entryString = ReadLine(entry); int.TryParse(entryString, exercises); 21 22 exercises = coursel.NumberOfExercises; 23 24 // Get info for another class Write("What class do you have homework for? "); entryString = ReadLine (); 25 26 27 course2.className = entrystring; 28 29 30 Write("How many exercises must you complete? "); entryString = ReadLine(); char. TryParse(entryString, exercises); course2.NumberOfExercises = exercises; 31 32 33 34 Writeline ("You have {0} minutes of homework for {1}", coursel.timeToComplete, coursel.ClassName); Writeline ("and {0} more minutes for {1}", 35 36 } 37 38 ass HomeworkAssignment course2.timeToComplete, course2.ClassName); 39 40 private int numberofExercises; 41 private int timeToComplete; 42 // 10 minutes to complete each exercise 43 private const int TIME_PER_EXERCISE = 10; 44 public ClassName {get; set}; 45 public int NumberOfExercises 46 { 47 get 48 49 50 51 { return numberOfexercises; } set 52 53 numberofExercises = number; 54 55 56 } 57 public double TimeToComplete 58 { 59 60 61 62 63 } 64 private void CalcCompletionTime() 65 { 66 CalcCompletionTime(); get { return timeToComplete; timeToComplete = numberofExercises * TIME_PER_EXERCISE
1 Creates a HomeworkAssignment class 2 instantiates two objects The provided file has 3 and prompts the user for information about two courses syntax and/or logical 4ing static System.Console; errors. Determine the 5 ass DebugNinel problem(s) and fix the 7 static void Main() 8 { HomeworkAssignment coursel = new HomeworkAssignment(); HomeworkAssignment course2 = new HomeworkAssignment(); program. 10 11 12 13 string entryString; int exercises; // Get info for first class Write("What class do you have homework for? "); 14 15 16 entry = ReadLine(); 17 18 19 20 coursel.className = entryString; Write("How many exercises must you complete? "); entryString = ReadLine(entry); int.TryParse(entryString, exercises); 21 22 exercises = coursel.NumberOfExercises; 23 24 // Get info for another class Write("What class do you have homework for? "); entryString = ReadLine (); 25 26 27 course2.className = entrystring; 28 29 30 Write("How many exercises must you complete? "); entryString = ReadLine(); char. TryParse(entryString, exercises); course2.NumberOfExercises = exercises; 31 32 33 34 Writeline ("You have {0} minutes of homework for {1}", coursel.timeToComplete, coursel.ClassName); Writeline ("and {0} more minutes for {1}", 35 36 } 37 38 ass HomeworkAssignment course2.timeToComplete, course2.ClassName); 39 40 private int numberofExercises; 41 private int timeToComplete; 42 // 10 minutes to complete each exercise 43 private const int TIME_PER_EXERCISE = 10; 44 public ClassName {get; set}; 45 public int NumberOfExercises 46 { 47 get 48 49 50 51 { return numberOfexercises; } set 52 53 numberofExercises = number; 54 55 56 } 57 public double TimeToComplete 58 { 59 60 61 62 63 } 64 private void CalcCompletionTime() 65 { 66 CalcCompletionTime(); get { return timeToComplete; timeToComplete = numberofExercises * TIME_PER_EXERCISE
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![Instructions
DebugNine1.cs
+
1 Creates a HomeworkAssignment class
2 instantiates two objects
The provided file has
3 and prompts the user for information about two courses
syntax and/or logical
4 ing static System.Console;
errors. Determine the
5 ass DebugNinel
problem(s) and fix the
7 static void Main()
program.
8 {
HomeworkAssignment coursel = new HomeworkAssignment();
HomeworkAssignment course2 = new HomeworkAssignment();
10
11
12
string entrySstring;
int exercises;
13
14
// Get info for first class
Write("What class do you have homework for? ");
15
16
entry = ReadLine();
17
18
coursel.className = entryString;
Write("How many exercises must you complete? ");
entryString = ReadLine(entry);
int.TryParse (entryString, exercises);
19
20
21
22
23
24
25
exercises = coursel.NumberOfExercises;
// Get info for another class
Write("What class do you have homework for? ");
entryString = ReadLine();
26
course2.className = entrystring;
27
Write("How many exercises must you complete? ");
28
29
entryString = ReadLine();
char. TryParse(entryString, exercises);
30
31
32
33
34
course2.NumberofExercises = exercises;
Writeline ("You have {0} minutes of homework for {1}",
coursel.timeToComplete, coursel.ClassName);
Writeline("and {0} more minutes for {1}",
course2.timeToComplete, course2.ClassName);
36 }
37
38 ass HomeworkAssignment
39
40 private int numberofExercises;
41 private int timeToComplete;
42 // 10 minutes to complete each exercise
43 private const int TIME_PER_EXERCISE = 10;
44 public ClassName {get; set};
45 public int NumberofExercises
46 {
47
get
48
{
49
50
return numberOfexercises;
}
51
52
set
53
numberofExercises = number;
54
55
56 }
57 public double TimeToComplete
58 {
59
60
CalcCompletionTime();
get
{
61
62
63 }
64 private void CalcCompletionTime()
65 {
66
return timeToComplete;
}
timeToComplete = numberofExercises * TIME_PER_EXERCISE,
67 }](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb89dca38-7685-4dfe-8667-c909c5869386%2F1c6dc00d-ad48-45d5-ab19-493be8b6d644%2F1d6nj86_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Instructions
DebugNine1.cs
+
1 Creates a HomeworkAssignment class
2 instantiates two objects
The provided file has
3 and prompts the user for information about two courses
syntax and/or logical
4 ing static System.Console;
errors. Determine the
5 ass DebugNinel
problem(s) and fix the
7 static void Main()
program.
8 {
HomeworkAssignment coursel = new HomeworkAssignment();
HomeworkAssignment course2 = new HomeworkAssignment();
10
11
12
string entrySstring;
int exercises;
13
14
// Get info for first class
Write("What class do you have homework for? ");
15
16
entry = ReadLine();
17
18
coursel.className = entryString;
Write("How many exercises must you complete? ");
entryString = ReadLine(entry);
int.TryParse (entryString, exercises);
19
20
21
22
23
24
25
exercises = coursel.NumberOfExercises;
// Get info for another class
Write("What class do you have homework for? ");
entryString = ReadLine();
26
course2.className = entrystring;
27
Write("How many exercises must you complete? ");
28
29
entryString = ReadLine();
char. TryParse(entryString, exercises);
30
31
32
33
34
course2.NumberofExercises = exercises;
Writeline ("You have {0} minutes of homework for {1}",
coursel.timeToComplete, coursel.ClassName);
Writeline("and {0} more minutes for {1}",
course2.timeToComplete, course2.ClassName);
36 }
37
38 ass HomeworkAssignment
39
40 private int numberofExercises;
41 private int timeToComplete;
42 // 10 minutes to complete each exercise
43 private const int TIME_PER_EXERCISE = 10;
44 public ClassName {get; set};
45 public int NumberofExercises
46 {
47
get
48
{
49
50
return numberOfexercises;
}
51
52
set
53
numberofExercises = number;
54
55
56 }
57 public double TimeToComplete
58 {
59
60
CalcCompletionTime();
get
{
61
62
63 }
64 private void CalcCompletionTime()
65 {
66
return timeToComplete;
}
timeToComplete = numberofExercises * TIME_PER_EXERCISE,
67 }
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education
Expert Answers to Latest Homework Questions
Q: Compute applied overhead for February
Q: abc general accountions
Q: Subject - General Account
Q: Compute bolster's predetermined overhead rate
Q: The following data pertains to the direct materials cost for the month of
October:
Standard costs:…
Q: How many units must be sold yield a profit of 50000?
Q: General Accounting
Q: Subject - General Account
Q: Financial Accounting
Q: solution want. General account
Q: General Accounting Question provide answer
Q: Hshshsheheheh
Q: hello teacher please solve questions
Q: I want answer
Q: Brightwood furniture provide the following data
Q: Please given answer
Q: How much would you expect quarterly net operating income to increase?
Q: Get correct answer this general accounting question
Q: Need answer please
Q: General accounting questions please given answer
Q: Need Step by step answer