2002-feb24-net / 2002-feb24-net/brendan-project0

Requirement not fully met as a result of hard coding in productclass

オープン
#1 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

This code is a demonstration of a hard coded display of products with the use of a dictionary.

using System;
using System.Collections.Generic;
using System.Text;

namespace Project0.Library
{
public class Products
{

public void Displayallorders()
{
System.Console.WriteLine("What do you want to order?");
System.Console.WriteLine("beverages, combinations, entrees, desserts");
string choice = System.Console.ReadLine();

Dictionary My_beverages = new Dictionary();
//private.Dictionary
My_beverages.Add("1 Mango Juice", 3.00);
My_beverages.Add("2 Bottled", 2.00);
My_beverages.Add("3 Soft Drinks", 2.25);
My_beverages.Add("4 Ice Tea", 2.25);
My_beverages.Add("5 Cranberry Juice", 2.25);
My_beverages.Add("6 Coffee", 2.25);

if (choice == "beverages")
{
foreach (KeyValuePair beverage in My_beverages)
{
Console.WriteLine(beverage.Key.ToString() + " " + beverage.Value.ToString());
}
System.Console.WriteLine("what will you like to drink?");
string test = System.Console.ReadLine();
System.Console.WriteLine("you chose: " + test);
}

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

The issue is about hard-coded product data in the Products class. Look at the Displayallorders method in the Project0.Library namespace. The goal is to replace the dictionary with a dynamic data source. Check if there are other files for data access or models. A test might verify the display still works after the change.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
backend
issue の種類
リファクタリング
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。